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.

CurrentCellValidating and RowValidating not triggered properly in GridTemplateColumn

Thread ID:

Created:

Updated:

Platform:

Replies:

130223 Apr 28,2017 11:30 PM May 4,2017 07:21 AM WPF 2
loading
Tags: SfDataGrid
Sam Chan
Asked On April 28, 2017 11:30 PM

Hi,

This is related to a previous post https://www.syncfusion.com/forums/130022/lookup-a-control-in-a-gridtemplatecolumn-edittemplate. The suggested solution involved using a GridTemplateColumn to have different controls in a cell depending on the row data. When using GridTemplateColumn, the Validating events are not triggered as expected. The following behaviours are not expected:
  1. When double-clicking a cell in a GridTemplateColumn to enter edit mode, the RowValidating event is triggered immediately. But if edit mode was initiated with F2, the RowValidating event is triggered correctly.
  2. When edit mode is entered by double-clicking, the RowValidating event is not triggered after editing the row. Calling sfdatagrid.GetValidationHelper().SetCurrentRowValidated(false) in the changed event of the custom control used in the GridTemplateColumn is a workaround as suggested in a previous post. But calling sfdatagrid.GetValidationHelper().SetCurrentCellValidated(false) doesn't help to trigger the CurrentCellValidating event as SetCurrentRowValidated(false) does with the RowValidating event.
Could you please help me with the following:
  1. What is the best way to suppress the immediate RowValidating event in (1)? 
  2. Or can the SfDataGrid be set up to allow a double-click to behave the same way as a F2 key press?
  3. Is there a similar workaround for triggering the CurrentCellValidating event as calling SetCurrentRowValidated(false)?
I've attached the project I used to test the behaviours.

Regards,

Sam


Attachment: WPF1449676857ValidatingNotFired_25c3967d.zip

Sam Chan
Replied On April 29, 2017 12:31 AM

Hi,

I think I've found the answer to (c) in https://www.syncfusion.com/forums/118082/currentcellvalidating-event-is-not-executed-on-gridtemplatecolumn. Unless something has changed in the most recent version.

Regards,

Sam

Muthukumar Kalyanasundaram [Syncfusion]
Replied On May 4, 2017 07:21 AM

Hi Sam,  
 
We were able to reproduce the issue and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates  
 
 
Please let me know if you have any questions.  
 
Regards, 
Muthukumar K 


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.

;