Prevent deselection of DataGrid list item

I have a DataGrid that i need to keep selectable, but a client has noticed that they can hold down the CTRL button while selecting a row and it totally breaks the swf file. So i would like to disable the CTRL button in that particular DataGrid but if i have to do it throughout the swf file thats also okay. PS i am developing in Flex 1.5

drawItem looks like:
protected function drawItem(item:IListItemRenderer,
                                selected:Boolean = false,
                                highlighted:Boolean = false,
                                caret:Boolean = false,
                                transition:Boolean = false):void
If I override it and make it public, what would I put for the item parameter??

Similar Messages

  • Datagrid/list item saperator need help

    hey guys.... so i got another question lol
    im trying for a list to look exactly like the image i have attached to this post...
    basically space between each item and a dotted line image on the bottom of that image....
    anyone have any ideas??
    i have the following so far...
        <mx:TabNavigator width="275" height="400">
            <mx:VBox label="USER OPTIONS" width="100%" height="100%">
                <s:List width="100%" height="100%">
                    <s:dataProvider>
                        <s:ArrayList>
                            <fx:Object label="Adjust Volume" />
                            <fx:Object label="Arm/Disarm System" />
                            <fx:Object label="Change Mastercode" />
                            <fx:Object label="Secondary Codes" />
                            <fx:Object label="Bypass the Sensors" />
                            <fx:Object label="Record/Delete Messages" />
                            <fx:Object label="Set Time" />
                            <fx:Object label="System Status" />
                        </s:ArrayList>
                    </s:dataProvider>
                </s:List>
            </mx:VBox>
            <mx:VBox label="TROUBLESHOOTING">
            </mx:VBox>
        </mx:TabNavigator>

    cyber,
    I'd look at making a custom item rendererer and then adding a repeating fill BitmapImage at the bottom (or top):
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/halo">
        <s:Label id="labelDisplay"
                 left="4" right="4" top="4" bottom="5" />
        <s:BitmapImage id="dottedLine"
                       source="@Embed('../redbluebg.gif')"
                       fillMode="repeat"
                       width="100%"
                       bottom="0" />
    </s:ItemRenderer>
    And then set the item rederer in your main app:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
        <s:layout>
            <s:VerticalLayout paddingLeft="20" paddingTop="20" />
        </s:layout>
        <s:controlBarContent>
            <s:HSlider id="sl" minimum="20" maximum="600" value="100" />
        </s:controlBarContent>
        <s:List id="lst" itemRenderer="skins.foo" labelField="firstName" width="{sl.value}">
            <s:dataProvider>
                <s:ArrayList>
                    <fx:Object firstName="1.One" lastName="1.Two" />
                    <fx:Object firstName="2.One" lastName="2.Two" />
                    <fx:Object firstName="3.One" lastName="3.Two" />
                    <fx:Object firstName="4.One" lastName="4.Two" />
                    <fx:Object firstName="5.One" lastName="5.Two" />
                    <fx:Object firstName="6.One" lastName="6.Two" />
                    <fx:Object firstName="7.One" lastName="7.Two" />
                </s:ArrayList>
            </s:dataProvider>
        </s:List>
    </s:Application>
    Peter

  • Prevent multiple users from accessing a list item at the same

    Hi,
    I have a scenario where, if a list item is opened (in edit mode) by one user, no other user should able to access it. I mean to checkin/checkout kind of thing which is not possible with sharepoint lists.
    One thing that I have done through infopath 2010, by setting a rule on form load. On form load, set a field's value Assigned To to Current User and then submit data. In case I am getting value of Assigned To getting stored in the list as a new record
    along with all the values from previous fields.
    I want to update the same record not the duplicate record.
    Please suggest a solution for it. 

    Hi
    add a new column to your list COL_EDITING( type yes, no )
    Default value : NO
    Customize your editform.aspx attached to your form, when it open
    A. analyze if COL_EDITING=NO
    If it isn;t alert  an error message ( the item is in edit mode by another user  )  , and close the page
    if it is --->
    B to fill COL_EDITING=YES
    and next permit user to fill the fields in the form
    Also
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • How to prevent RSS Viewer web part from overriding list-item CSS style?

    I am using SharePoint Online. I have a web part page with a number of web parts with links. Font size of the links is ~12px.
    If I add an RSS Viewer web part to the page, then it overrides the 'list-item' class CSS Style to something like 8px, which is unreadable.
    To correct this I have tried the following:
    1. Added the following code to a Script Editor Web Part on same page:
    <style type="text/css">
    .item link-item
    font-size:20px !important;
    .link-item
    font-size:20px !important;
    </style>
    2. Completely deleted all XSL from the RSS Viewer web part and replaced it with very simple formatting code which format the links within the RSS web part to 16px - but still the other links are set to 8px.
    3. Linked a custom style sheet to the relevant master page and set the link-item classes in there, ensuring that it is executed after the standard SharePoint css.
    ...but nothing works!
    It appears that, as soon as the RSS Viewer web part is added to the page it overrides the list-item style and then will not release it even if all the XSL within the web part is deleted!
    On deleting the RSS Viewer from the page and saving it, the links font size returns to normal.
    Does anyone have a fix/work around for this?
    Thanks in advance,
    Jimmy

    Hi Jimmy,
    I recommend to use “.link-item a” instead as the code below to change the font size of the links:
    <style>
    .link-item a
    font-size:20px !important;
    </style>
    And I tested the code above in my environment and it worked fine.
    Best regards,
    Thanks
    Victoria Xia
    TechNet Community Support

  • Create New List Item

    I am getting an error each time I try to run this code and get the error message "There was a problem submitting your answers. Please try again later."I have looked at this for so long now I am not sure if I am missing something or what. I have referenced SPServices and jquery and it is working correctlyI am trying to make a crossword using some code I found online and I followed it andstill get this error. // Create an object to associate each SharePoint column with the class name used for the input and the user's response for that column
    var responses = {
    "oneAcross": {
    "selector": "one-across",
    "column": "OneAcross",
    "answer": ""
    "oneDown": {
    "selector": "one-down",
    "column": "OneDown",
    "answer": ""
    "twoDown": {
    "selector": "two-down",
    "column": "TwoDown",
    "answer": ""
    "threeDown": {
    "selector": "three-down",
    "column": "ThreeDown",
    "answer": ""
    "fourAcross": {
    "selector": "four-across",
    "column": "FourAcross",
    "answer": ""
    // Create the batchCmd variable that will be used to create the new list item
    var batchCmd = '<Batch OnError="Continue"><Method ID="1" Cmd="New">';
    // Concatenate values of each response input by iterating over the object representing the responses
    $.each( responses, function() {
    // Cache the current item in the responses object.
    var $response = this;
    // For each input in the crossword associated with the current response object, get the values and save them in the answer property.
    $( '.' + $response.selector ).each( function() {
    $response.answer += $( this ).val().toLowerCase();
    // Add the response to the batchCmd
    batchCmd += '<Field Name="' + $response.column + '"><![CDATA[' + $response.answer + ']]></Field>';//Create a new list item on the destination list using the batchCmd variable
    $().SPServices({
    operation: "UpdateListItems",
    async: true,
    webURL: "http://operations.home.blah.com/sites/EIS/SEEIS/SSC/Lists/",
    listName: "Crossword",
    updates: batchCmd,
    completefunc: function( xData, Status ) {
    // If the AJAX call could not be completed, alert the user or include your own code to handle errors.
    if ( Status !== "success" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    else {
    // If there was an error creating the list item, alert the user or include your own code to handle errors.
    if ( $( xData.responseXML ).find( 'ErrorCode' ).text() !== "0x00000000" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    // if the list item was successfully created, alert the user and navigate to the Source parameter in the URL (or to a URL of your choosing).
    else {
    alert( "Your answers were submitted successfully! Click OK to continue." );
    if ( window.location.href.indexOf( "Source=" ) !== -1 ) {
    var url = window.location.href.split( "Source=" )[1].split( "&" )[0];
    window.location.href = url;
    else {
    window.location.href = "/";

    When I look at the demo on the page it fires the same response as that is part of the error handling because it is a standalone HTML and not on a sharepoint server so I am wondering if something I am missing on the submit.click function or batchcmd. 
    I included the entire code for it to see if maybe you can see something I am not.  My crossword is on a Sharepoint Server
    $( '#crossword-submit' ).click( function( event ) {
    // If you decide to use a hyperlink instead of a button input, this will prevent
    //the hyperlink from actually navigating away from the page or to an anchor.
    event.preventDefault();
    // Disable the button so the user can't click it again and submit the answers more than once.
    $( this ).prop( 'disabled', true );
    // Prevent submission if the crossword isn't completed.
    if ( $( '#crossword' ).find( 'input' ).filter( function() { return $( this ).val() === ""; }).length !== 0 ) {
    alert( "You have left some answers blank. Please complete all answers before submitting." );
    $( this ).removeProp( 'disabled' );
    return false;
    // Confirm that the user wants to submit their answers.
    var confirmResponse = confirm( "Are you sure you are ready to submit your answers? Once submitted they cannot be changed.\n\nClick OK to continue or Cancel to review your answers." );
    if ( confirmResponse === false ) {
    $( this ).removeProp( 'disabled' );
    return false;
    // Create an object to associate each SharePoint column with the class name used for the input and the user's response for that column
    var responses = {
    "oneAcross": {
    "selector": "one-across",
    "column": "OneAcross",
    "answer": ""
    "oneDown": {
    "selector": "one-down",
    "column": "OneDown",
    "answer": ""
    "twoDown": {
    "selector": "two-down",
    "column": "TwoDown",
    "answer": ""
    "threeDown": {
    "selector": "three-down",
    "column": "ThreeDown",
    "answer": ""
    "fiveDown": {
    "selector": "five-down",
    "column": "FiveDown",
    "answer": ""
    "sixDown": {
    "selector": "six-down",
    "column": "SixDown",
    "answer": ""
    "sevenDown": {
    "selector": "seven-down",
    "column": "SevenDown",
    "answer": ""
    "eightDown": {
    "selector": "eight-down",
    "column": "EightDown",
    "answer": ""
    "fourAcross": {
    "selector": "four-across",
    "column": "FourAcross",
    "answer": ""
    "nineAcross": {
    "selector": "nine-across",
    "column": "NineAcross",
    "answer": ""
    "tenAcross": {
    "selector": "ten-across",
    "column": "TenAcross",
    "answer": ""
    "elevenAcross": {
    "selector": "eleven-across",
    "column": "ElevenAcross",
    "answer": ""
    "twelveAcross": {
    "selector": "twelve-across",
    "column": "TwelveAcross",
    "answer": ""
    // Create the batchCmd variable that will be used to create the new list item
    var batchCmd = '<Batch OnError="Continue"><Method ID="1" Cmd="New">';
    // Concatenate values of each response input by iterating over the object representing the responses
    $.each( responses, function() {
    // Cache the current item in the responses object.
    var $response = this;
    // For each input in the crossword associated with the current response object
    //, get the values and save them in the answer property.
    $( '.' + $response.selector ).each( function() {
    $response.answer += $( this ).val().toLowerCase();
    // Add the response to the batchCmd
    batchCmd += '<Field Name="' + $response.column + '"><![CDATA[' + $response.answer + ']]></Field>';
    // Close the batchCmd variable
    batchCmd += '</Method></Batch>';
    // Create a new list item on the destination list using the batchCmd variable
    $().SPServices({
    operation: "UpdateListItems",
    async: true,
    webURL: "http://operations.homestead.abc.com/sites/EIS/SEEIS/SSC/Lists/",
    listName: "Crossword",
    updates: batchCmd,
    completefunc: function( xData, Status ) {
    // If the AJAX call could not be completed, alert the user or include your own code to handle errors.
    if ( Status !== "success" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    else {
    // If there was an error creating the list item, alert the user or include your own code to handle errors.
    if ( $( xData.responseXML ).find( 'ErrorCode' ).text() !== "0x00000000" ) {
    alert( "There was a problem submitting your answers. Please try again later." );
    // if the list item was successfully created, alert the user and navigate
    //to the Source parameter in the URL (or to a URL of your choosing).
    else {
    alert( "Your answers were submitted successfully! Click OK to continue." );
    if ( window.location.href.indexOf( "Source=" ) !== -1 ) {
    var url = window.location.href.split( "Source=" )[1].split( "&" )[0];
    window.location.href = url;
    else {
    window.location.href = "/";
    </script>

  • Get Calendar List Item GUID

    I downloaded code for a reservation event receiver from here: 
    http://blog.sharepointsydney.com.au/post/Setting-up-multiple-calendars-for-meeting-room-bookings-prevent-double-booking.aspx
    However, on the ItemUpdating it throws an "Object Reference Not Set to an Instance of an Object" error.  By commenting out parts of the code and re-deploying I have narrowed the issue down to the line that gets the item's GUID:
    string guid_internal = collItems.List.Fields["GUID"].InternalName;
    When I modify it to something like "UniqueId" I get the "Value does not fall within expected range" error.  Is there a better way to obtain the GUID of the calendar list item - or am I missing something?  Full code below:
    using System;
    using Microsoft.SharePoint;
    namespace Webcoda.WSS.Calendar.Events
    class PreventDoubleBooking: SPItemEventReceiver
    /// <summary>
    /// This event is triggered when the user adds a new item
    /// </summary>
    /// <param name="properties"></param>
    public override void ItemAdding(SPItemEventProperties properties)
    //Our query string variable
    string strQuery = null;
    try
    //Get the Sharepoint site instance
    using (SPWeb oWebsite = new SPSite(properties.SiteId).OpenWeb(properties.RelativeWebUrl))
    //Get the collection of properties for the Booking item
    SPListItemCollection collItems = oWebsite.Lists[properties.ListTitle].Items;
    //Get the Calendar List that we will be querying against
    SPList calendar = oWebsite.Lists[properties.ListId];
    //Get the internal name of the fields we are querying.
    //These are required for the CAML query
    string start_internal = collItems.List.Fields["Start Time"].InternalName;
    string end_internal = collItems.List.Fields["End Time"].InternalName;
    string MeetingRoom_Internal = collItems.List.Fields["Meeting Room"].InternalName;
    //Get the query string parameters
    string start_str = properties.AfterProperties[start_internal].ToString();
    string end_str = properties.AfterProperties[end_internal].ToString();
    string MeetingRoom_str = properties.AfterProperties[MeetingRoom_Internal].ToString();
    //Construct a CAML query
    SPQuery query = new SPQuery();
    //Create the CAML query string that checks to see if the booking we are attemping
    //to add will overlap any existing bookings
    strQuery = string.Format(@"
    <Where>
    <And>
    <Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Gt>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Gt>
    </And>
    <And>
    <Lt>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Lt>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    </Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    <And>
    <Geq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Geq>
    <Leq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Leq>
    </And>
    </Or>
    </Or>
    <Eq>
    <FieldRef Name='Meeting_x0020_Room' />
    <Value Type='Choice'>{2}</Value>
    </Eq>
    </And>
    </Where>
    <OrderBy>
    <FieldRef Name='EventDate' />
    </OrderBy>
    ", start_str, end_str, MeetingRoom_str);
    //Set the query string for the SPQuery object
    query.Query = strQuery;
    //Execute the query against the Calendar List
    SPListItemCollection existing_events = calendar.GetItems(query);
    //Check to see if the query returned any overlapping bookings
    if (existing_events.Count > 0)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage += "This booking cannot be made because of one or more bookings in conflict. <BR><BR>";
    //Here you can loop through the results of the query
    //foreach (SPListItem oListItem in existing_events)
    properties.ErrorMessage += "Please go back and schedule a new time.";
    catch (Exception ex)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage = "Error looking for booking conflicts: " + ex.Message;
    /// <summary>
    /// This event is triggered when the user edits an calendar item
    /// </summary>
    /// <param name="properties"></param>
    public override void ItemUpdating(SPItemEventProperties properties) {
    string strQuery = null;
    try {
    //Get the Sharepoint site instance
    using (SPWeb oWebsite = new SPSite(properties.SiteId).OpenWeb(properties.RelativeWebUrl)) {
    //Get the collection of properties for the Booking item
    SPListItemCollection collItems = oWebsite.Lists[properties.ListTitle].Items;
    //Get the Calendar List that we will be querying against
    SPList calendar = oWebsite.Lists[properties.ListId];
    //Get the internal name of the fields we are querying.
    //These are required for the CAML query
    string start_internal = collItems.List.Fields["Start Time"].InternalName;
    string end_internal = collItems.List.Fields["End Time"].InternalName;
    string MeetingRoom_Internal = collItems.List.Fields["Meeting Room"].InternalName;
    string guid_internal = collItems.List.Fields["GUID"].InternalName;
    //Get the query string parameters
    string start_str = properties.AfterProperties[start_internal].ToString();
    string end_str = properties.AfterProperties[end_internal].ToString();
    string MeetingRoom_str = properties.AfterProperties[MeetingRoom_Internal].ToString();
    string guid_str = properties.AfterProperties[guid_internal].ToString();
    //Construct a CAML query
    SPQuery query = new SPQuery();
    //Create the CAML query string that checks to see if the booking we are attemping
    //to change will overlap any existing bookings, OTHER THAN ITSELF
    strQuery = string.Format(@"
    <Where>
    <And>
    <And>
    <Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Gt>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Gt>
    </And>
    <And>
    <Lt>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Lt>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    </Or>
    <Or>
    <And>
    <Leq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Leq>
    <Geq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Geq>
    </And>
    <And>
    <Geq>
    <FieldRef Name='EventDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{0}</Value>
    </Geq>
    <Leq>
    <FieldRef Name='EndDate' />
    <Value Type='DateTime' IncludeTimeValue='TRUE'>{1}</Value>
    </Leq>
    </And>
    </Or>
    </Or>
    <Eq>
    <FieldRef Name='Meeting_x0020_Room' />
    <Value Type='Choice'>{2}</Value>
    </Eq>
    </And>
    <Neq>
    <FieldRef Name='GUID' />
    <Value Type='GUID'>{3}</Value>
    </Neq>
    </And>
    </Where>
    <OrderBy>
    <FieldRef Name='EventDate' />
    </OrderBy>
    ", start_str, end_str, MeetingRoom_str, guid_str);
    //Set the query string for the SPQuery object
    query.Query = strQuery;
    //Execute the query against the Calendar List
    SPListItemCollection existing_events = calendar.GetItems(query);
    //Check to see if the query returned any overlapping bookings
    if (existing_events.Count > 0)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage += "This booking cannot be made because of one or more bookings in conflict. <BR><BR>";
    //Here you can loop through the results of the query
    //foreach (SPListItem oListItem in existing_events)
    properties.ErrorMessage += "Please go back and schedule a new time.";
    catch (Exception ex)
    //Cancels the ItemAdd action and redirects to error page
    properties.Cancel = true;
    //Edit the error message that will display on the error page
    properties.ErrorMessage = "Error looking for booking conflicts: " + ex.Message;

    Hi there,
    Please verify the internal name of column which you have hardcoded in the code i.e 
    string start_internal = collItems.List.Fields["Start Time"].InternalName;
    string end_internal = collItems.List.Fields["End Time"].InternalName;
    I have used the Room reservation template from MSDN which has provided by MS under the code name of "Fantastic 40" along with below James Finn article.
    http://www.codeproject.com/Articles/30983/SharePoint-Reservations
    It worked for me for reservation. 

  • How to highlight selected list item in sap ui5?

    I have a list..in which custom list items have been used.
    On click of any custom list item it should get highlighted,
    I am able to click on each custom item...and have added an browser event
    on its click..which changes its color ..
    function to change its color goes like this:
    hbox.attachBrowserEvent("click", function(event) {
                    var idOfHbox= this.getId();
                     $('#'+idOfHbox).css"backgroundcolor","#e6f2f9");
    ALso for each custom list item I have used a button and a checkbox in a HBox..
    So am changing the hbox color (on click event).
    The problem here is...
    When i select one item, and then select another item..both of them are highlighted..
    I want only the current selected item to be highlighted.
    Please guide..

    Have you tried using the SelectionChange event on the list, rather than the browser onClick event?
    I believe the SelectionChange event is fired for each selected and deselected item in the list.
    https://sapui5.hana.ondemand.com/sdk/docs/api/symbols/sap.m.ListBase.html#event:selectionChange
    Many thanks,
    Jason

  • Custom itemRenderer in a F3 ComboBox on specific list items after combobox creation

    Hi,
    I'm trying to set a specific list item in a mx combobox to have a custom item renderer, the problem is that I cannot do this via mxml, it needs to be done via actionscript at a later stage, eg: combobox gets created, combobox  gets populated, user does other tasks, combobox needs to set one or more items in the combobox to have icons (via item renderer)..
    I can do this via the onChange event, but it only applies the icon when the combobox is opened and there is a slight delay so you can see the icon being added.
    Thanks in advance for any help
    J

    Hi,
    If I understand correctly, you can create you comboBox with all items at the begining:
    http://blog.flexexamples.com/2007/08/18/displaying-icons-in-a-flex-combobox-control/
    After that, base on user task, you can filter you comboBox:
    http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items-in-a-datagrid-in- flex/
    In this way you don't see the delay.
    Johnny
    Please rate answers.

  • ECMA script for checking active workflows for an list item

    Hi i am having more than 1 workflow associated with the list if there is any workflow that is active for an item then i need to prevent starting another workflow for the same item. I am using the following code to achieve the same. Can anyone please provide
    me the ECMA object model equivalent for achieving the same.
        //Check for any active workflows for the document
            private void CheckForActiveWorkflows()
                // Parameters 'List' and 'ID' will be null for site workflows.
                if (!String.IsNullOrEmpty(Request.Params["List"]) && !String.IsNullOrEmpty(Request.Params["ID"]))
                    this.workflowList = this.Web.Lists[new Guid(Request.Params["List"])];
                    this.workflowListItem = this.workflowList.GetItemById(Convert.ToInt32(Request.Params["ID"]));
                SPWorkflowManager manager = this.Site.WorkflowManager;
                SPWorkflowCollection workflowCollection = manager.GetItemActiveWorkflows(this.workflowListItem);
                if (workflowCollection.Count > 0)
                    SPUtility.TransferToErrorPage("An workflow is already running for the document. Kindly complete it before starting a new workflow");
            }

    Hi,
    According to your post, my understanding is that you wanted to use ECMA script to check active workflows for an list item.
    You can use the Workflow web service "/_vti_bin/workflow.asmx"
    - GetWorkflowDataForItem operation in particular.
    Here is a great blog for you to take a look at:
    http://jamestsai.net/Blog/post/Using-JavaScript-to-check-SharePoint-list-item-workflow-status-via-Web-Service.aspx
    In addition, you can use
    SPServices. For more information, please refer to:
    http://sharepoint.stackexchange.com/questions/72962/is-there-a-way-to-check-if-a-workflow-is-completed-using-javascript
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • CheckBox list item

    hi friends
    i am new with itemrenders how can i get the list item
    checkbox(here checkbox is the itemrender) values
    thanks in advance....

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    mx.controls.List (Flex 3):
    The <mx:List> tag inherits all the tag attributes of
    its superclass, ... [write-only] Used by Flex to suggest bitmap
    caching for the object.
    Link:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/List.html
    Displaying icons in a Flex List control at Flex Examples:
    http://blog.flexexamples.com/2007/08/17/displaying-icons-in-a-flex-list-control/
    --> <mx:Application xmlns:mx='
    http://www.adobe.com/2006/mxml'
    Link:
    http://blog.flexexamples.com/2007/08/17/displaying-icons-in-a-flex-list-control/
    mx.controls.List (Flex 2 Language Reference):
    If the data is incorrect, you can call the preventDefault()
    method to stop Flex from passing the new data back to the list
    control and from closing the
    Link:
    http://livedocs.adobe.com/flex/2/langref/mx/controls/List.html
    Smooth Scroll for Horizontal List - Flex India Community |
    Google:
    I have created image gallery with Horizontal List[Flex 2.0].
    Just as below ref site. My Problem is i need a smooth scroll for
    Horizontal List. where images
    Link:
    http://groups.google.com/group/flex_india/browse_thread/thread/a12441143b98d32c?hide_quote s=no
    Populate the list -- Flex 2.01:
    You populate a list-based form control with the
    <mx:dataProvider> child tag. The <mx:dataProvider> tag
    lets you specify list items in several ways.
    Link:
    http://livedocs.adobe.com/flex/201/html/tutorial_controls_019_4.html
    Selecting multiple items in Flex List and DataGrid controls
    at:
    http://blog.flexexamples.com/2007/11/21/allowing-multiple-selected-items-in-flex-<br>
    list-and-datagrid-controls/ --> <mx:Application
    Link:
    http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid -controls/
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • List item without scroll bar

    Hi,
    When I depoly the form with tlist item. it does not display a vertical bar even if the number of item exceeds the viewable area of tlist. However, it display the scroll bar again when I trigger the same piece of list item loading code with another control after a while.

    You could add your own When-Validate-Record to prevent a NULL value from being added rather than using the Required setting, I find this to be a better alternative as you can provide better exception messages to the user.

  • List item behaviour

    HI
    I'm using list items, TLists to be precise, and whenever I choose an item and delete it, the cursor moves to the 1st item of the list.
    Is there any way to prevent this from happening?
    Thank you for any help

    9.0.4.0.19
    FUNCTION adiciona(lista1 VARCHAR2, lista2 VARCHAR2,valor VARCHAR2, texto VARCHAR2) RETURN BOOLEAN IS      
              indice PLS_INTEGER; -- indice do elemento a adicionar
              nome VARCHAR2(255); -- nome do elemento a adicionar
         BEGIN
              IF valor IS NOT NULL THEN
                   -- obter o indice do elemento que esta seleccionado
                   indice := FUNCOES.get_lista_indice (lista1, valor);     
                   -- obter o nome do elemento que está seleccionado
                   nome := GET_LIST_ELEMENT_LABEL(lista1, indice);
                   IF nome IS NOT NULL THEN -- se foi seleccionado um elemento da lista
                        -- Adicionar a lista dos seleccionados
                        insere_elemento(lista2, nome, valor);                    
                        --Remove-o da lista
                        FUNCOES.retira_elemento (lista1, valor);
                        COPY(GET_LIST_ELEMENT_VALUE(lista1,1),lista1);
                        COPY(GET_LIST_ELEMENT_VALUE(lista2,GET_LIST_ELEMENT_COUNT(lista2)),lista2);
                        RETURN TRUE;
                   ELSE
                             mensagem.mostra (mensagem.ALERTA_STOP, 'AVISO',
                                       texto);
                   END IF;
              ELSE
                   IF GET_LIST_ELEMENT_COUNT(lista1)>1 THEN
                        mensagem.mostra (mensagem.ALERTA_STOP, 'AVISO',
                                  texto);
                   END IF;
              END IF;
              RETURN FALSE;
         END adiciona;
    PROCEDURE insere_elemento (nome_lista VARCHAR2, texto VARCHAR2, valor VARCHAR2)
    IS
         id_lista ITEM;
         elementos_lista PLS_INTEGER;      
         BEGIN
         -- Tenta encontrar o id da lista pretendida
         id_lista := FIND_ITEM(nome_lista);
         IF NOT ID_NULL(id_lista) THEN
              elementos_lista := GET_LIST_ELEMENT_COUNT(id_lista);
              -- Adiciona o novo elemento ao fundo da lista
              ADD_LIST_ELEMENT(id_lista, elementos_lista +1, texto, valor);
         ELSE
              mensagem.mostra
                   (mensagem.ALERTA_STOP, 'A lista '|| nome_lista||' não existe.');
         END IF;      
         END insere_elemento;

  • Error while editing a list item - SharePoint 2010.

    Hi ,
    i have 2 site collection one is read only site and another one is authoring site. both site collection are inside single web application and referring same content database.
    when i try to edit a list item using authoring site i am getting the below error message. this is for all the lists in the site.
    " the item is no longer available. it may have been deleted by another user. click ok to refresh the page."
    i am able to edit the list items using read only site as an administrator.
    please help me on these.

    This could be a permission issue, refer to the following post for more information
    http://techtrainingnotes.blogspot.in/2012/02/sharepoint-error-this-item-is-no-longer.html
    Cheers,

  • List item problem in oracle forms 6i

    Hello,
    I've 10 test filed, in-front of each text field there are 10 list item (separate list item)
    for each list item element list is given below
    Route
    Customer name
    Delivery date
    Delivery Time
    Delivery Session
    Expected received
    Actual Received
    Fresh Received
    Rate per liter
    Debit Amount
    On text fields I am fetching records from another file. User will map the list item with text item.
    What i want to check is, list item should not get repeated. i.e suppose I've run time display like this
    text item
    list item
    A
    ROUTE
    B
    DELIVERY DATE
    C
    DELIVERY TIME
    D
    DELIVERY DATE
    E
    EXPECTED RECEIVED
    F
    ACTUAL RECEIVED
    G
    FRESH RECEIVED
    H
    RATE PER LITER
    I
    DEBIT AMOUNT
    J
    DELIVERY SESSION
    on text filed B- DELIVERY DATE is assign and at text field D again DELIVERY DATE is assign. I want to avoid this thing and prompt the user regarding the same. How should I go about this? Should I design a button for validation, if yes then what should be the code? or should i go with WHEN-LIST-CHANGE? if so, then what should be the code?
    my design time display is like this
    text
    list item
    txt1
    lst1
    txt2
    lst2
    txt3
    lst3
    txt4
    lst4
    txt5
    lst5
    txt6
    lst6
    txt7
    lst7
    txt8
    lst8
    txt9
    lst9
    txt10
    lst10
    please suggest something
    Thank You
    Sam

    THe most user-friendly way would be to remove elements from all other lists when they are chosen once. You would have to have a WHEN-LIST-CHANGED-trigger on all listitem and populate the the listitems accordingly.

  • List Item problem in oracle forms

    Hi,
    I am using list item in oracle forms 6i and facing one problem. I am populating list using following built-in.
    Clear_list()
    Create_Group_From_Query( )
    Populate_list()
    The problem I am facing is when list gets populate it keep the cursor at last element of list with null value. I want cursor to go at first item in the list. Is this thing is possible. The list item I am using is pop-list. In combo its showing list perfectly but I have to use pop-list only. Please help to come out of this problem.
    Thanks in advance
    Shweta.

    Hi Shweta,
    Please post your query in Oracle Forms discussion forum.
    Thanks,
    Wilson.

Maybe you are looking for