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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

15809 Jun 28,2004 09:48 AM Jun 29,2004 02:39 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 28, 2004 09:48 AM

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?

Administrator [Syncfusion]
Replied On June 28, 2004 10:15 AM

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.

Administrator [Syncfusion]
Replied On June 28, 2004 12:54 PM

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?

Administrator [Syncfusion]
Replied On June 28, 2004 02:08 PM

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;

Administrator [Syncfusion]
Replied On June 29, 2004 02:39 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;