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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filter on gridGroupingControl

Thread ID:





35616 Oct 5,2005 11:36 AM UTC Oct 6,2005 11:28 AM UTC WinForms 6
Tags: GridControl
Prathima Venkobachar
Asked On October 5, 2005 11:36 AM UTC

Hi, I am using gridGroupingControl. I have a checkbox column in the grid. I have a requirenment to show only checked records on click of a link. I am using a Filter expression this.gridGroupingControl.DataSource.DefaultView.RowFilter = "checkbox = true"; The probelm I am facing is If I had checked three records - when I apply filter it displays only first two records.It doesn''t display the last record. We don''t want to apply filter on grid Table Descriptor.We want to apply for the datasource bound to the grid. I feel as soon I check/uncheck it is not commiting it to the grid.When I move to the next row ,I get that record. I want changes to commit as soon as I check/uncheck. Thanks in advance, Prathima

Administrator [Syncfusion]
Replied On October 5, 2005 01:47 PM UTC

Try handling the checkbox click event and end the edit there. private void gridGroupingControl1_TableControlCheckBoxClick(object sender, GridTableControlCellClickEventArgs e) { this.gridGroupingControl1.CurrencyManager.EndCurrentEdit(); }

Prathima Venkobachar
Replied On October 6, 2005 08:53 AM UTC

Hi, This is not working. I still ger two rows,if I had selected 3 rows. Thanks, Prathima

Administrator [Syncfusion]
Replied On October 6, 2005 09:51 AM UTC

How do I see the problem in this sample? (use the menu item to filter the Datatable.) http://www.syncfusion.com/Support/user/uploads/GGC_CheckBox_Filter_77a79512.zip

Prathima Venkobachar
Replied On October 6, 2005 09:53 AM UTC

Hi, I was not able to reprodune the problem. I am facing one more problem. 1.I selected 3 records. 2.Click "Selected link".It displays 3 records. 3.I uncheck one record and click on the Show All link, I get "object reference not set to an instance". Pl find the attached sample. Thanks, Prathima GGC_CheckBox_2790.zip

Administrator [Syncfusion]
Replied On October 6, 2005 10:20 AM UTC

You can avoid this problem by applying the changes directly to the datatable.
private void SyncfusionGridControl_TableControlCheckBoxClick(object sender, GridTableControlCellClickEventArgs e) {

	GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
	int index = e.TableControl.Table.FilteredRecords.IndexOf(style.TableCellIdentity.DisplayElement.GetRecord() as GridRecord);
	if(index > -1)
		this.dt.DefaultView[index]["Col0"] = ! (bool)this.dt.DefaultView[index]["Col0"];
		e.Inner.Cancel = true;

Prathima Venkobachar
Replied On October 6, 2005 11:28 AM UTC

It works fine. Thanks a lot !! Prathima


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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