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 do I get the current record from the TableControlCheckBoxClick event

Thread ID:

Created:

Updated:

Platform:

Replies:

53579 Dec 15,2006 02:22 PM Dec 18,2006 01:42 AM Windows Forms 1
loading
Tags: Grouping
James Blibo
Asked On December 15, 2006 02:22 PM

I have a bool value in the datasource that maps to a CheckBox CellType.

When the user click the checkbox, I want to be able to get the current record and also be able to cancel the event if any changes were made. Is this the event that I used and if it is how, do I go about doing this.

BTW, the fllw snippet that I have in my TableControlCheckBoxClick event below is returning null for the Record.


Record rec1 = e.TableControl.Table.DisplayElements[e.Inner.RowIndex].ParentRecord;

GridRecordRow rec2 = this.gridGroupingControl3.Table.DisplayElements[e.Inner.RowIndex] as GridRecordRow;

Administrator [Syncfusion]
Replied On December 18, 2006 01:42 AM

Hi James,

We would recommend using the RecordValueChanging event in your case. This event will be triggered on change of the record value.

The check box value can be retrieved by getting the e.NewValue and conditionally check with column name (e.Column). In the conditional loop, the new value can be saved or cancelled using e.Cancel property.

>>>>>>>>>>>>>>>
// RecordValueChanging properties
e.Column // Gets the column name of the cell being changed
e.Cancel // To cancel the event
e.NewValue // Gets the CellValue of the record changed
e.Record // Record being changed
>>>>>>>>>>>>>>>

Kindly let us know if you need any further assistance.

Best regards,
Madhan

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.

;