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

DataBoundGrid Covered cells behaviour when filtered.

Hi all, I am using GridDataBoundGrid and use GridFilterBar for filtering data. To my logic, consecutive cells in a column with same data will be merged using Covered ranges. Everything works fine. But when I apply filtering, the cell covering is not proper with the filtered cells. The initial cell covering, with all data present, persists eventhough the data is filtered. If anyone has solution for this, please help me out. thanks in advance, Bidin

3 Replies

AD Administrator Syncfusion Team December 17, 2003 05:17 PM

How are you setting the covered cells? If you are explicitly setting them by adding ranges to grid.Model.CoveredRanges, then I think when the filter changes the grid''s contents, you will have to clear the CoveredRanges and reset them based on the grid''s new contents. To catch a filter changing, you can subscribe to the gridFilterBar1.FilterBarTextChanged event.


BD Bidin Dinesababu December 17, 2003 05:26 PM

Yes I am explicitly setting them by adding ranges to grid.Model.CoveredRanges. I tried the gridFilterBar1.FilterBarTextChanged event to update the Covered range again. But the time I get the text change event, the grid model is not updated. >How are you setting the covered cells? If you are explicitly setting them by adding ranges to grid.Model.CoveredRanges, then I think when the filter changes the grid''s contents, you will have to clear the CoveredRanges and reset them based on the grid''s new contents. To catch a filter changing, you can subscribe to the gridFilterBar1.FilterBarTextChanged event.


AD Administrator Syncfusion Team December 18, 2003 12:36 AM

Try the IBindingListChanged event through the CurrencyManager. This worked for me in the FilterBar sample that we ship. //code to subscribe to thr event in formload CurrencyManager cm = (CurrencyManager)this.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember]; IBindingList list = cm.List as IBindingList; list.ListChanged += new ListChangedEventHandler(cm_ListChanged); //sample event handler //the SetCoveredCells method clears the current covered cells and then goes through the data and sets then aagin private void cm_ListChanged(object sender, ListChangedEventArgs e) { if(e.ListChangedType == ListChangedType.Reset) SetCoveredCells(); }

Loader.
Live Chat Icon For mobile
Up arrow icon