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

[Solved] combobox Item not cleared after databind()

1 Answer 105 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
TIGER
Top achievements
Rank 1
TIGER asked on 18 May 2009, 03:30 PM
HI,
  When  using load-on-demand feature for a multicolumn combobox, I refered to the tutorial adding new items into the combobox in ItemRequested event handler. Instead of adding combobox item, I had to create a new datatable object and re-assign DataSource and DataBind() (because there is no way to add a multicolumn item). The items in combobox repeated every time Datasource got assigned. According to the document, combobox item will be cleared when DataSource is assigned, is this a problem ? of course, I can solve this problem by reprocess the datatable to include only those items not previously added  to  the combobox. 

1 Answer, 1 is accepted

Sort by
0
Saed
Top achievements
Rank 1
answered on 20 May 2009, 11:22 PM
Hi Tiger,
Have you tried clearing combo items on SelectedIndexChanged? I think you also need to set population status parameter of requestItems to false prior to passing it to ItemsRequested as demonstrated in Documentation.

Hope this helps.

Regards,
saed
Tags
ComboBox
Asked by
TIGER
Top achievements
Rank 1
Answers by
Saed
Top achievements
Rank 1
Share this question
or