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.

How to set RelationField''s value in GridGroupingControl?

Thread ID:

Created:

Updated:

Platform:

Replies:

61623 May 30,2007 05:04 AM May 30,2007 01:41 PM Windows Forms 1
loading
Tags: GridControl
Ken Xu
Asked On May 30, 2007 05:04 AM

The following is my code:

void ParentGrouping_SourceListRecordChanged(object sender, Syncfusion.Grouping.RecordChangedEventArgs e)
{
......
e.Record.SetValue("ID", -e.OldIndex);
......
}

I found if I set value for the field "ID",then after the end of this event ,there will be no change in grid.
If I remove that line ,there will be a new row added in grid,i accept.

I want to modify "ID" to a random number due to Column "ID" linked child table to parent,if I don't do this,I can only New one parent record once.

Please help me!

haneefm [Syncfusion]
Replied On May 30, 2007 01:41 PM

Hi Ken,

You can handle the CurrentRecordContextChange event to modify the relation field values in a grid. Here is a code snippet.

private void gridGroupingControl1_CurrentRecordContextChange(object sender, Syncfusion.Grouping.CurrentRecordContextChangeEventArgs e)
{
if( e.Action == CurrentRecordAction.EndEditCalled )
e.Record.GetRecord().SetValue("D",1222);
}

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.

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.

;