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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Validator

Thread ID:

Created:

Updated:

Platform:

Replies:

103845 Jun 4,2012 07:25 PM UTC Jun 8,2012 02:09 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Fabio
Asked On June 4, 2012 07:25 PM UTC

Hello,

how i can validate grid cell value on row editing/adding?
I try with DatasourceContolRowAdding/Editing event but if i set the e.Cancel = true property the row isn't insert in the grid but the row on the grid return at original state loosing all the data and i need to click an another time on the grid row to set it in add new/edit row mode and i must insert all the data an another time. It is possibile also validate the grid data by jquery or javascript on client side? 

Thanks in advice,
Fabio

Yogeshwaran [Syncfusion]
Replied On June 8, 2012 02:09 PM UTC

Hi Fabio,

 In our current architecture client side validation is not possible . we have to validate this on serve side event “CurrentRecordContextChange” . we have validated for adding record .please refer the

Following code snippe

private void GridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)

{

 

if (e.Action == CurrentRecordAction.EndEditComplete && val == false)

{

 

this.GridGroupingControl1.Table.LastChangedRecord.Delete();

this.GridGroupingControl1.Table.AddNewRecord.BeginEdit();

 

}

}

For your convenience , we have created sample and can be downloaded from below link.

ColumnWidth-GridWeb.zip

Please let us know if you have any concerns.

Regards,

Yogesh R


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.

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

;