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.
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
ADAdministrator Syncfusion Team December 17, 2003 10:17 PM UTC
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.
BDBidin DinesababuDecember 17, 2003 10:26 PM UTC
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.
ADAdministrator Syncfusion Team December 18, 2003 05:36 AM UTC
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();
}