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

How to get the current table row

C#, In GridGroupingcontrol, When I click on a CELL in the grid, I want to raise a event to send CURRENT CELL''s underneath table''s row data. Where should I put the rasie event code? How I can get the CURRENT CELL''s underneath table''s row (DataRow)? TIA

4 Replies

AD Administrator Syncfusion Team October 4, 2004 12:22 PM

Maybe the TableCOntrolCellClick event will work for you.
private void gridGroupingControl1_TableControlCellClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
{
	GridRecord rec = this.gridGroupingControl1.Table.CurrentRecord as GridRecord;
	if(rec != null)
	{
		DataRowView drv = rec.GetData() as DataRowView;
	}
}


AD Administrator Syncfusion Team October 5, 2004 09:10 AM

Thank you for help. It works. But I got side-effect problem. When I click a cell with drop-down list, the drop-down list does not appear because of the "CLICK" event. I guess we should not put the code in "TableControlCellClick" event, instead, we should put the code in event like "Grid Selected Row Changed"? But I don''t know which Grid event? TIA >Maybe the TableCOntrolCellClick event will work for you. >
>private void gridGroupingControl1_TableControlCellClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
>{
>	GridRecord rec = this.gridGroupingControl1.Table.CurrentRecord as GridRecord;
>	if(rec != null)
>	{
>		DataRowView drv = rec.GetData() as DataRowView;
>	}
>}
>


AD Administrator Syncfusion Team October 5, 2004 11:19 AM

You could try TableControlCurrentCellMoved.


AD Administrator Syncfusion Team October 5, 2004 11:45 AM

Thank you! That works. >You could try TableControlCurrentCellMoved.

Loader.
Live Chat Icon For mobile
Up arrow icon