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 can I access the current record in the ggc and/or in the underlying datatable from TableControlCurrentCellValidating?

Thread ID:





53450 Dec 13,2006 05:08 PM Dec 18,2006 05:15 AM Windows Forms 5
Tags: Grouping
James Blibo
Asked On December 13, 2006 05:08 PM

Firstly, is this the right event to use when validating cell input and wanting to cancel if validation fails?

How can I access the GridRecord?

How can I access the DataRow of the underlying datatable?

James Blibo
Replied On December 13, 2006 05:40 PM

found it... never mind

James Blibo
Replied On December 13, 2006 05:51 PM

I can not get the DataRowView from the Record in the TableControlCurrentCellValidating.

Record rec = e.TableControl.Table.CurrentRecord;
DataRowView drv = rec.GetData() as DataRowView;

Please help! DataRowView is null!

Administrator [Syncfusion]
Replied On December 14, 2006 01:54 AM

Hi James,

Please refer to the following sample which demonstrates the retrieving of the DataRowView of the currently edited record using your code snippet. Please check whether the editing row is being Record display kind. Which version of the grid are using?

Sample: GGC_CurrentCellValidating.zip

Kindly try it and let us know if you need any further assistance.
Have a nice day.

Best regards,

James Blibo
Replied On December 15, 2006 05:44 PM

This is the same code that I posted and said wasn't working. DataRowView is always null.

I have a flat datasource that is grouped by one column. The version of the grid is 4.4

Administrator [Syncfusion]
Replied On December 18, 2006 05:15 AM

Hi James,

Thank you for being patience.

We tried using your code snippet to reproduce the issue here. The reason for the DataRowView being null is because the resultant of the rec.GetData() method is DataRow. Please try using the following code snippet to retrieve the data.

// TableControlCurrentCellValidating event
Record rec = e.TableControl.Table.CurrentRecord;
DataRow dr = rec.GetData() as DataRow;

Kindly let us know if you need any further assistance.

Best regards,


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.