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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to to select a given DataRow in a GGC?

Thread ID:

Created:

Updated:

Platform:

Replies:

68888 Oct 4,2007 02:41 PM UTC Oct 4,2007 08:31 PM UTC WinForms 1
loading
Tags: Grouping
John Hair
Asked On October 4, 2007 02:41 PM UTC

Hi,
I have a GGC with several nested DataTables, Im adding a row to one of the child tables and I want it to be selected in the GGC, expanding any parent nodes on the way. I also want the GGC to scroll if required to ensure the row is visible.

Do you have any examples on how to do this?

Thanks
John

haneefm [Syncfusion]
Replied On October 4, 2007 08:31 PM UTC

Hi John,

You can use the UnsortedRecords property to find the newly record and set that record as current record using the SetCurrent method. Below are the codes that shows this task.

GridTable _table = this.gridGroupingControl1.GetTable("TableName");
int Oldcount = _table.UnsortedRecords.Count;

DataTable dt = ds.Tables["TableName"];
DataRow dr = dt.NewRow();
dr["Col1"] = "NewValue";
dt.Rows.Add(dr);
dt.AcceptChanges();

_table.UnsortedRecords[Oldcount].SetCurrent("ColumnName");
_table.UnsortedRecords[Oldcount].SetSelected(true);

Best regards,
Haneef

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.

Warning Icon 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.Close Icon

;