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

Automatic update of the filtered GGC

Thread ID:





18577 Sep 2,2004 06:38 PM UTC Sep 3,2004 05:11 AM UTC WinForms 4
Tags: GridControl
Asked On September 2, 2004 06:38 PM UTC

I''m trying to create a GGC that has a checkbox, clicking on which will filter the record out of the grid. I have a table, where a boolean (actually, short integer) column is my criteria, whether the record should be on the grid, or not. In the following example, I set the filtered dataview as a data source for the grid, however the behaviour is rather strange - I cannot uncheck the checkboxes at all. In debug window I see CancelMouseEvent exception. Why wouldn''t unchecked records just go away? Is there a way to do what I want with checkboxes? (I can probably put a button there, that removes my rows manually inside BeginUpdate/EndUpdate) --- private void Form1_Load(object sender, System.EventArgs e) { DataSet ds = new DataSet("MyDataset"); DataTable dt = ds.Tables.Add("MyTable"); dt.Columns.Add("Col1", typeof(string)); dt.Columns.Add("Col2", typeof(short)); DataView dv = new DataView(dt); dv.RowFilter = "Col2 = 0"; for(int i=0; i<10; i++) { dt.Rows.Add(new object [] {"MyText" + Convert.ToString(i), (short)(i % 3)}); } Syncfusion.Windows.Forms.Grid.Grouping.GridTableDescriptor gtc = gridGroupingControl2.TableDescriptor; Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor gdc = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor(); gdc.MappingName = "Col1"; gdc.HeaderText = "My Col1"; gdc.ReadOnly = true; gdc.Appearance.AnyRecordFieldCell.CellType = "Static"; gtc.Columns.Add(gdc); gdc = new Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor(); gdc.MappingName = "Col2"; gdc.HeaderText = "My Col2"; gdc.ReadOnly = false; gdc.Appearance.AnyRecordFieldCell.CellType = "CheckBox"; gdc.Appearance.AnyRecordFieldCell.CheckBoxOptions.CheckedValue = "1"; gdc.Appearance.AnyRecordFieldCell.CheckBoxOptions.CheckedValue = "0"; gtc.Columns.Add(gdc); gridGroupingControl1.DataSource = dt; gridGroupingControl2.DataSource = dv; dv.AllowDelete = false; dv.AllowNew = false; dv.AllowEdit = true; }

Administrator [Syncfusion]
Replied On September 2, 2004 07:07 PM UTC

Does setting gdc.Appearance.AnyRecordFieldCell.CellValueType = typeof(int); on the checkbox column make a difference?

Administrator [Syncfusion]
Replied On September 2, 2004 08:28 PM UTC

Unfortunately, no. I also tried typeof(short) Debug window shows: catched at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) in :line 0

Administrator [Syncfusion]
Replied On September 2, 2004 09:37 PM UTC

I can see the problem in using the code you furnished. It works ok with a GridDataBoundGrid, but fails in the GridGroupingControl. We will look into this to see why it is failing,and update this thread when we have more information.

Administrator [Syncfusion]
Replied On September 3, 2004 05:11 AM UTC

This problem has been corrected in our library. If you would like to get a private build with this correction, you can submit a Direct Trac support incident and request one. The next public release scheduled now is a couple of months away.


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

Live Chat Icon For mobile
Live Chat Icon