Inserting values against ListBox items

4 posts, 0 answers
  1. Susi
    Susi avatar
    40 posts
    Member since:
    Jul 2012

    Posted 16 Jul 2012 Link to this post

    Dear All,
    I am developing product in asp.net using c sharp and I have listbox in my page and i have list items in Listbox which is added staticaly here i need to insert value against partcular listbox item and i have listbox items namely List1,List2,List3,...List10.and also i have one TextBox to insert values.

    but here should follow sequencing order for example does not allow inserting List3 value when not inserted List2 value .. how to control this scenario.

    my aspx code is,


    <telerik:RadListBox ID="radlstExtensionFields" runat="server" Width="400" AutoPostBack="true"
                           OnSelectedIndexChanged="radlstExtensionFields_SelectedIndexChanged">
                           <Items>
                               <telerik:RadListBoxItem Text="List1" runat="server" Value="0" />
                               <telerik:RadListBoxItem Text="List2" runat="server" Value="1" />
                               <telerik:RadListBoxItem Text="List3" runat="server" Value="2" />
                               <telerik:RadListBoxItem Text="List4" runat="server" Value="3" />
                               <telerik:RadListBoxItem Text="List5" runat="server" Value="4" />
                               <telerik:RadListBoxItem Text="List6" runat="server" Value="5" />
                               <telerik:RadListBoxItem Text="List7" runat="server" Value="6" />
                               <telerik:RadListBoxItem Text="List8" runat="server" Value="7" />
                               <telerik:RadListBoxItem Text="List9" runat="server" Value="8" />
                               <telerik:RadListBoxItem Text="List10" runat="server" Value="9" />
                           </Items>
                       </telerik:RadListBox>
  2. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 19 Jul 2012 Link to this post

    Hi Sucindran,

    Depending on the kind of approach you want to use, you can either use the ListBox's client API, or the server API to check the items already loaded in the ListBox and depending on the value decide whether to allow the insertion of the new item. You can see how to work with the client and server objects of RadListBox in the following help articles:
    http://www.telerik.com/help/aspnet-ajax/listbox-client-side-basics.html 
    http://www.telerik.com/help/aspnet-ajax/listbox-working-with-items-client-side.html 
    http://www.telerik.com/help/aspnet-ajax/listbox-working-with-items-server-side.html 
     
    Kind regards,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Susi
    Susi avatar
    40 posts
    Member since:
    Jul 2012

    Posted 21 Jul 2012 Link to this post

    Hi Bozhidar, Thank you very much for your reply...but i have another one listbox is called radlsttable..that listbox also have some items which is binding dynamically.items are like Table1,Table2,Table3. each table have some lists. here lists is called fields.
    That listbox is shown last inserted filed only remining list set to enable false same things followed to all the Tables and we can insert value against paricular list which is enabled.

    my question is,
    we can selecting radlsttable listbox items for radlstExtensionFields listbox items are visible based on inserted values to insert value. when i frequently select radlsttable listbox items,radlstExtensionFields listbox enabled true is not working some times.,
    how to solve this issue,

    Thanks,


  5. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 25 Jul 2012 Link to this post

    Hello,

    Could you send the relevant code for the ListBoxes, as well as the logic for inserting new items, so that I can get a better understanding of the issue.
     
    Kind regards,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top