if you store in your databas thing such as “male” or “female” and give jqGrid
select value “{value:”1:male;2:female”},” i don't think it will work. You have to give {value:”male:male;female:female”} as select value if you want it work.
The first item of each values of your jqGrid select must match with the value stores in your database.,
Hello,
try to set your rows like
1, Jet Li, 1
2, Nicole Kidman, 2
Regards
Sorry,
but i'm using the last one…
How to switch to developpement version?
Ok,
the problem has been solved.
It seems that the editrules works from the second column of the colmodel.
So i add an non editable column in my colmodel at the first position and it works now
I've set the 'minver' variable
Try to include the jqmodal library in your html file
something like :
i've tried to make it possible by modifying the grid.formedit.js
in
function createEl(eltype,options,vl) {
I add
case "password" :
I've modified the file, but nothing change

Ok so I made something like this
$(”#listCustomers”).jqGrid({
url:'include/gridCustomers.php?&nd='+new Date().getTime(),
editurl:'include/gridCustomers.php?&nd='+new Date().getTime(),
datatype: 'json',
colNames:['Customerno','Customername','Company Group','Adress','City','Country','Language','Product','Format','Category','Keycustomer'],
colModel :[
{name:'idCustomer', index:'CUSTOMER_ID',editable:true,edittype:"text",editrules:{required:true},width:115},
{name:'name', index:'NAME',editable:true,edittype:"text",editrules:{required:true},width:170} ,
{name:'idCompany', index:'COMPANY_ID',editable:true,edittype:"select",editoptions:{value:'0:'},editrules:{required:true,number:true,minvalue:1},width:140},
{name:'adress', index:'ADRESS',editable:true,edittype:"text",editrules:{required:true},width:210} ,
{name:'city', index:'CITY',editable:true,edittype:"text",editrules:{required:true}},
{name:'idCountry', index:'COUNTRY_ID',editable:true,edittype:"select",editoptions:{value:'0:;3:Belgium;2:Canada;4:Holland;13:Ivory Coast;1:Mexico'},editrules:{required:true},width:100},
{name:'idLanguage', index:'LANGUAGE_ID',editable:true,edittype:"select",editoptions:{value:'0:'},editrules:{required:true},width:100} ,
{name:'idProduct', index:'PRODUCT_TYPE_ID',editable:true,edittype:"select",editoptions:{value:'0:'},editrules:{required:true},width:80},
{name:'idFormat', index:'FORMAT_ID',editable:true,edittype:"select",editoptions:{value:'0:'},editrules:{required:true},width:80},
{name:'idCategory', index:'CATEGORY_ID',editable:true,edittype:"select",editoptions:{value:'0:'},editrules:{required:true},width:90},
{name:'keyCustomer', index:'KEYCUSTOMER',hidden:true,editable:true,editrules:{edithidden:true}, edittype:"checkbox",editoptions:{value:'1:0'}}],
pager: $('#pagerCustomers'),
recordtext: 'customers',
shrinkToFit:true,
width:900,
height:230,
rowNum:10,
rowList:[10,20,30],
sortname: 'NAME',
sortorder: “desc”,
viewrecords: true,
imgpath: 'design/themes/basic/images',
shrinkToFit:true
})
As you can see “idCustomer” and “name” are required.When i fill my form and put nothing in each of these field I got this message :
Customername: Field is required
Normally I should havethis message first no?
Customerno: Field is required
I have jdGrid 2.3.1
I put the required option on the 2 column.
When I add a row with an empty form, I got the reqired field message for the second colum an not for the first one.
tony said:
Hello,
Currently this option works only on field of type text and textarea.
Regards
Tony
Ok,
with this code it gives me an error message on the second field?Is it normal?
{name:'idCustomer', index:'CUSTOMER_ID',editable:true,edittype:"text",editrules:{required:true},width:115},
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top