This is a migrated thread and some comments may be shown as answers.

Inserting values against ListBox items

3 Answers 75 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Susi
Top achievements
Rank 1
Susi asked on 16 Jul 2012, 11:38 AM

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>

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 19 Jul 2012, 07:36 AM
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.
0
Susi
Top achievements
Rank 1
answered on 21 Jul 2012, 12:23 PM
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,


0
Bozhidar
Telerik team
answered on 25 Jul 2012, 08:10 AM
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.
Tags
ListBox
Asked by
Susi
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Susi
Top achievements
Rank 1
Share this question
or