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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataBoundGrid Covered cells behaviour when filtered.

Thread ID:

Created:

Updated:

Platform:

Replies:

9438 Dec 17,2003 09:34 PM UTC Dec 18,2003 05:36 AM UTC WinForms 3
loading
Tags: GridControl
Bidin Dinesababu
Asked On December 17, 2003 09:34 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

Bidin Dinesababu
Replied On December 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.

Administrator [Syncfusion]
Replied On 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(); }

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.

Warning Icon 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.Close Icon

;