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

Edit filtered column Then filterbar crashed

Hi, I used a GridDataBoundGrid, linked it to a data table as datasource. Defined a new filter bar and wired it to thr grid. I filtered the grid on one of the columns, say Column-A. When I make a change on any of the rows on the filtered column, application crushes.. Is this a Syncfusion bug, is there any solution?

6 Replies

AD Administrator Syncfusion Team March 8, 2004 02:57 AM

This is corrected in our 2.0 code base.


BI bizdin March 9, 2004 01:45 AM

My grid version is 2.0.2.1 ?? >This is corrected in our 2.0 code base.


AD Administrator Syncfusion Team March 9, 2004 03:24 AM

Try setting the Binder.OptimizeListChangedEvent property to true. public Form1() { InitializeComponent(); this.gridDataBoundGrid1.Binder.OptimizeListChangedEvent = true; // // TODO: Add any constructor code after InitializeComponent call // }


BI bizdin March 9, 2004 05:35 AM

I added the one line code under this.InitializeComponent() in the Constructor; I received "Object reference not set to an object" error. Then I moved the code at the end of my LoadData() Method in which I fill the Dataset and set the grid datasource, I received no errors but now when I choose an item in the filterbar, no filter is applied, all the rows remain the same? >Try setting the Binder.OptimizeListChangedEvent property to true. > >public Form1() >{ > InitializeComponent(); > this.gridDataBoundGrid1.Binder.OptimizeListChangedEvent = true; > // > // TODO: Add any constructor code after InitializeComponent call > // >} >


AD Administrator Syncfusion Team March 9, 2004 07:06 AM

The appearance of the grid not changing is a refresh problem in the beta code (I think). After doing the filter, drag the grid on/off the screen or move another window over it so the grid is forced to repaint. I think you will see the filter was actually done, but the screen was not repainted. (This has been fixed in later code.) After you force the grid to repaint so you see the filtered results, I think if you will edit one of the entries so it no longer satisfies the filter, you will see it gracefully being removed from the grid instead of throwing an exception as before. At least this is what I see in the FilterBar sample using 2.0.2.1 and adding OptimizeListChangedEvent as above.


BI bizdin March 9, 2004 08:32 AM

That was true; I added an event handler for filterBar.FilterBarTextChanged event and call the Invalidate method of the Grid; now everything is fine; Thanks! >The appearance of the grid not changing is a refresh problem in the beta code (I think). After doing the filter, drag the grid on/off the screen or move another window over it so the grid is forced to repaint. I think you will see the filter was actually done, but the screen was not repainted. (This has been fixed in later code.) > >After you force the grid to repaint so you see the filtered results, I think if you will edit one of the entries so it no longer satisfies the filter, you will see it gracefully being removed from the grid instead of throwing an exception as before. At least this is what I see in the FilterBar sample using 2.0.2.1 and adding OptimizeListChangedEvent as above.

Loader.
Live Chat Icon For mobile
Up arrow icon