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

Two Queries on Rad combo box

1 Answer 43 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Abinash
Top achievements
Rank 1
Abinash asked on 12 Nov 2008, 12:02 PM

1. I have two events itemsrequested  and selected indexchanged on my combo box.
On pageload combo box is loaded with a single value.
On text search the selected values get loaded and after that post back occurs. After post back if I expand the dropdown original single value( the value on page load is present). Why the searched value is not present?

For Example:
I have control which displays Manufacturers. On page load I get all the manufacturers in the datatable and load the selected value(eg. 'caterpilllar') in the dropdown(By filering all the other values). So my dropdown has one value only.
Now if I type 'a' all the records starting 'a' gets filtred and loaded in the dropdown. I select one of them and post back happens so as to bring the values related to the selected. But now the dropdown has only one value i.e. 'caterpillar' which is wrong. I am not modifying the value that is attached to thew control.

2. Once I erase all the text from the text area, I want all the records coming into the dropdown list but I see this going for infinite loop in the ItemsRequested event handler.
I have put  ItemRequestTimeout="500". It is going in an infinite loop between item requested and page load. The total records are 1267.
Any help would be highly appreciated.

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 18 Nov 2008, 09:34 AM
Hello Abinash,

Since you use load-on-demand, the items added in ItemsRequested event are not kept after postback. On postback you can use only the Text and the SelectedValue of the combobox. Also, it is not a good idea to have static items (inline items or added in page_load event) and items added on demand. This scenario is not supported at the time being. You can use the EmptyMessage property if you need to have a text in the combobox on its initial load.

I could not reproduce the infinite loop on point 2. Can you please open a support ticket and attach a sample project there illustrating the issue?

Sincerely yours,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Abinash
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or