We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Using dropdown datasource doesn''t update when datasource has new items added

Using dropdown datasource doesn''t update when datasource has new items added. I''m using a virtual grid and setting the datasource to an arraylist, when the arraylist is changed the dropdown seems to have a cached list of the orig items. How do i force it to update the list?

4 Replies

AD Administrator Syncfusion Team June 28, 2004 02:15 PM UTC

You might try setting these static properties to to if this will handle the problem. It tells the grid to use a reference and not clone the object. GridStyleInfoStore.DataSourceProperty.IsCloneable = false; GridStyleInfoStore.DataSourceProperty.IsDisposable = false; Another way to do this would be to handle CurrentCellShowingDropDown and explicitly set teh dataSource at that point, but setting the properties is simpler if that works for you.


AD Administrator Syncfusion Team June 28, 2004 04:54 PM UTC

found this in the code for the drop combo model it seems to check to see if the datasource has changed and the result is that it doesn''t update the internal lists datasource (obj1 == listBox.DataSource) I found that if i cloned my datasource then the list upadted.... seems like a ''Feature'' to me, perhaps there is someway of setting a flag to tell it to reset the source?


AD Administrator Syncfusion Team June 28, 2004 06:08 PM UTC

When you change your datasource, you could try setting the listbox datasource to null. This should force the grid to reload it. GridComboBoxCellRenderer cr = (GridComboBoxCellRenderer) this.gridControl1.CellRenderers["ComboBox"]; cr.ListBoxPart.DataSource = null;


AD Administrator Syncfusion Team June 29, 2004 06:39 AM UTC

Yep that fixed it for me... the useful bit i didn''t know about was getting hold of the listboxpart....

Loader.
Live Chat Icon For mobile
Up arrow icon