ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: dmcheng on October 16, 2013, 03:34:39 am
-
Hello. Can I make a column to be required entry?
Thanks
David
-
yes
For live checking the cells while in edit mode.
listen to cellEditKeyDown event
if evt.keyCode == "tab key" && column.require==true && $cell.value()==""
{
evt.preventDefault();
return false;
}
and for checking the whole data in grid.
loop through dataModel.data
and then loop through colModel
find the cells where rowData[dataIndx]=="" && column.required==true
{
editCell http://paramquery.com/api#method-editCell (http://paramquery.com/api#method-editCell)
break out of loop
}