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

How to know which Grid I,m working On

Hi every , I have tables A & B , A is Parent to B , i want to get the current record of of parent table when i click a record of parent table , dont know how to check which grid i,m working on when click on any record in either table A or B, Thanks.

Regards,
Mgs4solidsnake

1 Reply

AD Administrator Syncfusion Team December 18, 2006 08:50 AM UTC

Hi Mgs4solidsnake,

This can be achieved by handling the TableControlCellClick event and check for the table name by using e.TableControl.TableDescriptor.Name property. Please try the following code snippet and let us know if you need any further assistance.

>>>>>>>>>>>>>>>>>>>>>
//this.gridGroupingControl1.TableControlCellClick +=new GridTableControlCellClickEventHandler(gridGroupingControl1_TableControlCellClick);
private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
if(e.TableControl.TableDescriptor.Name == "B")
Console.WriteLine(e.TableControl.Table.CurrentRecord);
}
>>>>>>>>>>>>>>>>>>>>>

Have a nice day.

Best regards,
Madhan

Loader.
Live Chat Icon For mobile
Up arrow icon