EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: chrwei on September 04, 2013, 10:40:21 AM



Title: required fields in datagrid?
Post by: chrwei on September 04, 2013, 10:40:21 AM
I have grid editing working based on the "Row Editing in DataGrid" example.  in the example there's a combobox that's marked Required and I have that working.  I'm trying to make a text box required also, and this isn't doing it.
Code:
<th data-options="field:'F1',width:155,
editor:{
type:'text',
options:{
required:true
}
}">field 1</th>

I also tried this:
Code:
<th data-options="field:'F1',width:155,editor:'text',required:true">Field 1</th>


Title: Re: required fields in datagrid?
Post by: stworthy on September 04, 2013, 07:23:55 PM
The text editor has no 'required' property, please use validatebox editor instead.
Code:
<th data-options="field:'F1',width:155,
editor:{
type:'validatebox',
options:{
required:true
}
}">field 1</th>


Title: Re: required fields in datagrid?
Post by: chrwei on September 05, 2013, 12:03:45 PM
yeah I should have seen that.  thanks.