Validation Field
In many cases, there is a need to validate the input data is correct. So KAX.Grid provide a validator for users. While using a validator, you need to check the grid column field type. Validator can be only working in GridBoundColmn, GridNumericColumn, GridHTMLEditorColumn, GridDropDownColumn and GridDateTimeColumn. In ColumnValidationSettings property, you can set the RequiredFieldValidator to specify the error message content and the text color. ASPX code:
Add a Validator
In order to check the insert/update data is correct format, you can add a validator to the grid. It's really very simple, just follow the four steps in ItemCreate event as below:
C# code:
Specify in Server-side Validation event
In ServerValidation event, you can set the validation rules to the input data. If the input data is not validated, you can cancel this change. ASPX code:
C# code:
|
ASP.NET AJAX UI Controls ASP.NET AJAX Chart UI Control ASP.NET AJAX Grid UI Control OverviewGetting StartedGrid Columns ElementsTypesHeadersGrid Rows ItemsCommand ItemResizingReorderingSortingPaging Pager ItemDo PagingScrolling Do ScrollingScroll ShowingVirtual ScrollingGrouping Do GroupingGroup ExpressionsGroup ElementFiltering Do FilteringFiltering ExpressionSelecting Selecting RowsExportingOperating Edit ModeEdit RecordsValidation Data BindingGrid Style |