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
close icon

Make the selection arrow to the left of a row in a GridGroupingControl disappear programmatically.

Hello, everybody,

I have two GridGroupingControl's and a single detail panel where I show detailed information about the selected row, no matter which GridGroupingControl it belongs to.

I want to use the standard black arrow to the left of a row to mark the row for which I'm giving detailed information (see picture), and I want to be only one arrow, not one for each grid.

For that purpose, I need to make the arrow in a grid disappear when a row in the other grid is clicked; programmatically.

I don't know what events/objects allow to control selection arrow.

I've tried GridGroupingControl.TableControl.CurrentCell.Deactivate() to make the arrow go, but it doesn't work.

Any advice?

Thank you very much.
Jose Manuel

arrow.zip

1 Reply

AD Administrator Syncfusion Team October 12, 2007 10:38 AM UTC

One way you can do this is to subscribe to the Enter and Leave events on the grids, and there toggle the row header cell types between Header (shows no arrow) and RowHeaderCell (shows the arrow).

this.gridGroupingControl1.Leave += new EventHandler(grid_Leave);
this.gridGroupingControl1.Enter += new EventHandler(grid_Enter);
this.gridGroupingControl2.Leave += new EventHandler(grid_Leave);
this.gridGroupingControl2.Enter += new EventHandler(grid_Enter);

//the handlers
void grid_Enter(object sender, EventArgs e)
{
GridGroupingControl grid = sender as GridGroupingControl;
if (grid != null)
{
grid.Appearance.RecordRowHeaderCell.CellType = "RowHeaderCell";
grid.Appearance.AlternateRecordRowHeaderCell.CellType = "RowHeaderCell";
}
}

void grid_Leave(object sender, EventArgs e)
{
GridGroupingControl grid = sender as GridGroupingControl;
if (grid != null)
{
grid.Appearance.RecordRowHeaderCell.CellType = "Header";
grid.Appearance.AlternateRecordRowHeaderCell.CellType = "Header";
}
}

Loader.
Live Chat Icon For mobile
Up arrow icon