Forum


05:07

02/08/2008

Hi,
I've made a 2 column grid.
My colModel is defined like this.
{name:'subRegionName', index:'SUBREGION_NAME',width:100,editable:true,editoptions:{size:30},editrules:{required:true,number:false}},
{name:'idRegion', index:'REGION_ID',width:100,editable:true,edittype:"select",editoptions:{<? echo $regionValues;?>},editrules:{required:true,number:true}}],
In form edit mode I want to set the two field as "required"
When i want to add a row a modal form appears, I do not enter any values for the first field and it never tell me that field is required.Why? It's a bug?
When I have an only field in my form it works properly...
05:39

Moderators
30/10/2007

Hello,
Currently this option works only on field of type text and textarea.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
07:31

02/08/2008

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:'name', index:'NAME',editable:true,edittype:"text",editrules:{required:true},width:170} ,
08:13

Moderators
30/10/2007

What of error?
What is the error message?
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
09:33

Moderators
30/10/2007

To have idea please post the entry jqGridl array - I recommend to
make copy paste here.
Please use the latest release of jqGrid
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
10:57

02/08/2008

Ok so I made something like this
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
11:50

Moderators
30/10/2007

Thanks,
It is a bug. It is corrected.
TO work this open grid.formedit.js and find function checkValues
Replace:
function checkValues(val, valref) {
if(valref)
....
with
function checkValues(val, valref) {
if(valref >=0)
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
02:46

Moderators
30/10/2007

Be a sure that you use the development version, but not min.
It should work. Also clear the cache
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
09:29

Moderators
30/10/2007

I do not think so. This is a bug.
Also I think that there is a cashe that is not cleared.
Please clear the cache, switch to development version and try
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
04:41

Moderators
30/10/2007

Clear all the cache and
var minver = false;
Reagrds
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
75 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66