Forum


11:48

17/06/2009

I'm traying to import grid's configuration from a xml file , all works fine when at least i have two columns on the grid, but the problem is when i have only one colimn on the grid, I recive a message "Length of colNames <> colModel or 0!"
this is part of the xml file
......
<pager>#pgr_population</pager>
<pgbuttons>true</pgbuttons>
<pginput>true</pginput>
<colModel>
<name>concept1</name>
<index>concept1</index>
<width>400</width>
<align>left</align>
<editable>true</editable>
<editoptions>
<size>80</size>
<maxlength>160</maxlength>
</editoptions>
<resizable>true</resizable>
</colModel>
<rowList>10</rowList>
<rowList>20</rowList>
<rowList>30</rowList>
<colNames>POPULATION</colNames>
<sortorder>desc</sortorder>
............
And this is a part of the server response
......
<rows>
<page/>
<total>2</total>
<records>17</records>
<row id="9387">
<cell>COATEPEC</cell>
</row>
<row id="9401">
<cell>ZIMPIZAHUA</cell>
</row>
<row id="9402">
<cell>TEOCELO</cell>
</row>
</rows>
.....
Dou you have any ide whats is wrong????
I hope you can understand my question I'dont write the english very well
12:09

Moderators
30/10/2007

Yes - the message is pretty clear - you length of colModel array does not match the length in colNames array
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.
12:23

17/06/2009

Sorry Again
Yes, I understand the message but on my colMOdel I have only one element
<colModel><name>concept1</name> ...</colModel>
and on the colNames y have only one element
" <colNames>POPULATION</colNames>"
Also I did a JqueryGrid with one column and I used jqGridExport in order to get the xml, after that Iused it for loading the same grid but with jqGridImport and y recived the same message
And when I do the same with two or three columns or more I dont have any problem
12:26

Moderators
30/10/2007

Do you have multiselect or subGrid in this?
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.
12:56

17/06/2009

No I don't, It's just a simple grid, its just for display the information and only need one column,also I changed the value of <datatype>clientSide</datatype>, just for being sure that the problem isn't the server response, and how I mentioned before When two or more columns the heders or the colNames are displayed but with one column I recive the same message
05:21

Moderators
30/10/2007

Hello again,
Do you have enabled the rownumbers. If so there is a bug, which is corrected in GitHub.
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:
50 Guest(s)
Currently Browsing this Page:
1 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