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.
Unfortunately, activation email could not send to your email. Please try again.

Record.SetCurrent() bug within a Self-related GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

68172 Sep 11,2007 06:05 AM Sep 25,2007 02:46 AM Windows Forms 2
loading
Tags: Grouping
Paul Sullivan
Asked On September 11, 2007 06:05 AM

Hi,
I have attached an amended Self-related grid example app that you sent to me in response to a different question: (http://www.syncfusion.com/support/forums/message.aspx?&MessageID=67687). I have attempted to implement a simple "search and highlight" functionality in the code whereby the code finds a given value in a given column and sets the focus to the matching row. I can easily find the row but when I attempt to set the focus to the row (using Record.SetCurrent) it does not happen. If I do this without self-relation implemented (no hierarchy) then it works fine. Is this a bug or can you provide a workaround? To see this click the "Find and Highlight" button in the attached example.

SelfRelations.zip

Golda Rebecal [Syncfusion]
Replied On September 17, 2007 09:57 AM

Hi Paul,

Sorry for the delay in responding.

I am able to see that Record.SetCurrent is not working as expected when self-relation is used in GridGroupingControl.

Currently I am analyzing this issue to find a workaround and will get back to you within 1 business day.

Thank you for your patience.

Best regards,
Golda

Golda Rebecal [Syncfusion]
Replied On September 25, 2007 02:46 AM

Hi Paul,

Sorry for the delay in responding.

In order to set a record in a nested table as current, you have to expand its parent record and then set this record as current.

Here is the code snippet:


Record parent = null;
Record rec = null;
private void button5_Click(object sender, EventArgs e)
{
foreach(Record r in gridGroupingControl2.Table.Records)
{
foreach (Record rc in r.NestedTables[0].ChildTable.Records)
{
if (rc.GetValue(column).ToString() == "CRD DS ERICSSON EUR")
{
parent = r;
rec = rc;
break;
}
}
}
parent.IsExpanded = true;
rec.SetCurrent();
}


Please refer to the modified sample that illustrates the same:
http://websamples.syncfusion.com/samples/Grid.Windows/F68172/main.htm

Kindly let me know if this helps you.

We appreciate your interest in Syncfusion products.

Best regards,
Golda

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.

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.

;