How to get a child table''s CurrentRecord/Element in a nested ggc?

Hello,

As we known,a ggc binds a datasource like this:

ggc.DataSource = ds.Tables[n];

If I focus a child cell, and I found I can't get the CurrentRecord when I set a breakpoint and track the value:ggc.Table.CurrentRecord,it's equal to null.

Please help me!

3 Replies

KX Ken Xu June 4, 2007 07:37 AM UTC

Excuse me,
I have find a way to do that, but if you have a more official way , I will appreciate.


HA haneefm Syncfusion Team June 4, 2007 09:36 PM UTC

Hi Ken,

You can handle the TableControlCellClick event and get the CurrentRecord using the e.TableControl.Table.CurrentRecord property. Here is a code snippet

private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
Record rec = e.TableControl.Table.CurrentRecord;
}

If you wan to get current record on nested table, then use the GetTable("nestedTable").CurrentRecord property. Below is a code.

Record rec = this.grid.GetTable("nestedTableName").CurrentRecord;

Best regards,
Haneef


KX Ken Xu June 5, 2007 01:36 AM UTC

Wah~
We use the same code to get it~
Thank you,Haneef~

Loader.
Up arrow icon