The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
ADAdministrator 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.
ADAdministrator 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?
ADAdministrator 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;
ADAdministrator 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....