EasyUI Forum
May 16, 2024, 03:48:30 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: validateRow in datagrid  (Read 8763 times)
wymak
Newbie
*
Posts: 26


View Profile
« on: May 19, 2016, 07:18:18 AM »

Usually after editing a row in datagrid, the script call $('#dg').datagrid('validateRow',index) to do data validation.
Does anybody knows what will this 'validateRow' do?
(1) does it call up the field editor to validate the data entered, or
(2) call a built-in 'validateRow' function (which can be overridden by programmer) to do the data validation?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 19, 2016, 11:51:36 PM »

When calling 'validateRow' method on a row, all the field editors is validated by calling 'validate' method. This 'validate' method is defined in validatebox component. The user can set the 'validType' property for the editors to validate the inputing values.
Code:
editor: {
type:'textbox',
options:{
validType: ...
}
}
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!