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

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

Thread ID:

Created:

Updated:

Platform:

Replies:

69062 Oct 11,2007 10:23 AM Oct 12,2007 06:38 AM Windows Forms 1
loading
Tags: Grouping
José Manuel
Asked On October 11, 2007 10:23 AM

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

Administrator [Syncfusion]
Replied On October 12, 2007 06:38 AM

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";
}
}

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.

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.

;