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

GridGroupingControl - Selected records not cleared first time

Thread ID:





49609 Sep 21,2006 06:33 PM UTC Sep 26,2006 04:46 AM UTC WinForms 5
Tags: GridControl
Badri Rajani Kanth
Asked On September 21, 2006 06:33 PM UTC

Dear Syncfusion,

We are using V

gridgroupingControl.Table.SelectedRecords.Clear(); is not clearing the records for the first time. It is only clearing second time. I tried even using gridgroupingControl.Refresh().

What else should we do? Can you plz inform.

Rajani kanth

Administrator [Syncfusion]
Replied On September 22, 2006 05:16 AM UTC

Hi Rajani,

I was not able to reprodue this problem here, please see the attached sample that works fine in selected record clear method in the grid.

Here is a sample.

If this did not help, please update us with a sample project showing the problem.


Badri Rajani Kanth
Replied On September 25, 2006 08:39 AM UTC

Hi Haneef,

I am not able to download the zip file on your link.

Ok, my form is having a GGC. These are my grid settings

private void FormatGrid()
GGC.TableOptions.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.None;
GGC.TableOptions.ListBoxSelectionCurrentCellOptions =
GGC.TableOptions.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One;
GGC.TableModel.Options.ShowCurrentCellBorderBehavior =
GGC.TableModel.Options.SelectCellsMouseButtonsMask =
System.Windows.Forms.MouseButtons.Left | System.Windows.Forms.MouseButtons.Right;
GGC.TableControl.HScrollBehavior = GridScrollbarMode.Disabled;
GGC.TableOptions.IndentWidth = 0;
GGC.TableOptions.ShowRowHeader = false;
GGC.TableOptions.CaptionRowHeight = 0;


And grid displays few records. When I right click on column headers, i want to clear the record selection. Here is the code for that, which is not clearing for the first time.

private void GGC_TableControlMouseDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlMouseEventArgs e)
int rowIndex = 0;
int colIndex = 0;

bool clickedInsideGrid =
e.TableControl.PointToRowCol(new System.Drawing.Point(e.Inner.X, e.Inner.Y), out rowIndex, out colIndex);
//clicked inside grid?
if(e.Inner.Button == MouseButtons.Right)
//clear record selection and contexts


Rajani kanth

Administrator [Syncfusion]
Replied On September 25, 2006 01:02 PM UTC

Hi Rajani,

To get the desired behavior, add the code below in the TableControlMouseDown event handler of the GridGroupingControl.

private void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
Point pt = new Point(e.Inner.X, e.Inner.Y);
GridTableCellStyleInfo style = this.gridGroupingControl1.TableControl.PointToTableCellStyle(pt);
if(style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell)

Thanks for using Syncfusion Products.

Badri Rajani Kanth
Replied On September 25, 2006 03:51 PM UTC

Thank You Raja Gopal,

Problem is not with identifying ColumnHeaderCell.

SelectedRecords.Clear() is not clearing the very first time.

Rajani kanth

Administrator [Syncfusion]
Replied On September 26, 2006 04:46 AM UTC

Hi Rajani,

We tried to reproduce this issue in 4.1/ with .Net 2003+Windows XP sp2, but could not get this issue. Maybe I am not following the steps that you are doing. Attached sample working fine here. Can you post a small sample showing this problem or tell us how to see it in the Attached sample?

Sample : http://www.syncfusion.com/Support/user/uploads/ClearRecordGGC_317cca61.zip

Please let me know the version number of Studio you are testing this with and the .Net version.



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

or the page will be automatically redirected to 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