Hi Jose,
Thanks for your interest in Syncfusion Products.
You can get the underlying datarowview of the clicked cell in the TableControlMouseDown event using the below code.
void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
{
Point pt = new Point(e.Inner.X, e.Inner.Y);
GridTableCellStyleInfo styleInfo = e.TableControl.PointToTableCellStyle(pt);
if (styleInfo.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record)
{
Record rec = styleInfo.TableCellIdentity.DisplayElement.GetRecord();
DataRowView drv = (DataRowView)rec.GetData();
foreach (object obj in drv.Row.ItemArray)
Console.Write(obj.ToString() + "\t");
Console.WriteLine();
}
}
To prevent a column from sorting in GridGroupingControl, use the TableControlQueryAllowSortColumn event and set e.AllowSort to false. Below is the code.
void gridGroupingControl1_TableControlQueryAllowSortColumn(object sender, GridQueryAllowSortColumnEventArgs e)
{
if (e.Column.Name == columnName)
e.AllowSort = false;
}
Let me know if you have any other questions.
Regards,
Rajagopal