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.

Triggering CurrentRecordContextChange event on child table

Thread ID:

Created:

Updated:

Platform:

Replies:

116175 Apr 20,2014 01:31 AM Apr 23,2014 06:25 AM ASP.NET Web Forms (Classic) 3
loading
Tags: GridGroupingControl
Graeme Atkinson
Asked On April 20, 2014 01:31 AM

Hello,

I am trying to achieve the following:

I have a master detail grid, with GridRelationDescriptor defined. I want to trigger an event when a record in a child table is selected.

I see that there is the trigger "CurrentRecordContextChange" which I figured was the solution, implemented thus:

parentToChildRelationDescriptor.ChildTableDescriptor.CurrentRecordContextChange += new CurrentRecordContextChangeEventHandler(ChildGrid_CurrentRecordContextChange);

However, this is never triggered.

The same trigger at the master table works fine (as per various examples on the Syncfusion site)

Can anyone help with this? Is this the correct method to use? Is there an additional step needed here?

Many thanks,
Graeme Atkinson

Eswari S [Syncfusion]
Replied On April 22, 2014 05:41 AM

Hi Graeme,

 

Thank you for using Syncfusion products.

 

We request you to trigger “CurrentRecordContextChange” event for Parent Grid alone. And this event will trigger for both parent and child grid when record selected in grid. Please check with the video from the following link:

 

http://www.syncfusion.com/downloads/support/directtrac/general/video223538504.zip

 

Could you please try this and let us know if you have any other queries.

 

Regards,

Eswari S


Graeme Atkinson
Replied On April 22, 2014 11:47 PM

Thank you for your reply. So in this scenario how do I return details on the child record selected ? If it was the parent, I can use something like:

this.ParentGridControl.Table.CurrentRecord;

Kind regards,
Graeme



Eswari S [Syncfusion]
Replied On April 23, 2014 06:25 AM

 

 

Hi Graeme,

 

Thanks for your update.

 

For your requirement , CurrentRecord can get from CurrentRecordContextChange event using “e.Table.CurrentRecord”. Please refer to the following code snippets:

 

public void MasterGrid_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)

    {

        Record r = null;

        if (e.Action == CurrentRecordAction.EnterRecordComplete && e.Record != null)

        {

            r = e.Table.CurrentRecord;

        }

    }

 

Please try this and let us know if you have any queries.

 

Regards,

Eswari S


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.

;