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

Thread ID:





53450 Dec 13,2006 10:08 PM UTC Dec 18,2006 10:15 AM UTC WinForms 5
Tags: Grouping
James Blibo
Asked On December 13, 2006 10:08 PM UTC

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 10:40 PM UTC

found it... never mind

James Blibo
Replied On December 13, 2006 10:51 PM UTC

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 06:54 AM UTC

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 10:44 PM UTC

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 10:15 AM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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