Forum
21:05
03/07/2014
Hi, i'm newbie and i'm trying different thing on jqgrid. Now i've a problem with grouping.
When i add
                   grouping:true,
                   groupingView : {
                           groupColumnShow : [true],
                           groupText : ['<b>{0}</b>'],
                           groupCollapse : false,
                           groupOrder: ['asc'],
                           groupSummary : [false],
                           groupDataSorted : false,
                           groupField : ['TipoPersonale']
                           }
i receive an error CANNOT READ PROPERTY 'lenght' of NULL
if I remove this part of code all is OK and data are shown.
Â
Someone can help me ? Thanks in advance.
 $("#tablePersonal").jqGrid({
                   datatype: 'xmlstring', datastr: data.d,
                   xmlReader: {
                       root: "results",
                       row: "myrow",
                       repeatitems: false
                   },
                   colNames: ['myID', 'Name', 'Date. Ass.','Level', 'Level/Profile','TYPE'],
                   colModel: [{ name: 'ID', index: 'ID', width: 50 },
                   { name: 'LONGNAME', index: 'DIP_LONGNAME', width: 180, align: "left" },
                   { name: 'Date_Ass', index: 'Date_Ass', width: 70, align: 'center',formatter: 'date', formatoptions: {newformat: 'd-m-Y' }},
                   { name: 'cod1', index: 'cod1', width: 55, align: "center" },
                   { name: 'level_profile', index: 'level_profile', width: 100, align: "left"},
                   { name: 'TypePersonal', index: 'TypePersonal', width: 55, align: "center" }],
                   rowNum: 30,
                   pager: '#pagerPersonal',
                   viewrecords: true,
                   height: 'auto',
                   loadonce: true,
                   caption: '',
                  Â
                   grouping:true,
                   groupingView : {
                           groupColumnShow : [true],
                           groupText : ['<b>{0}</b>'],
                           groupCollapse : false,
                           groupOrder: ['asc'],
                           groupSummary : [false],
                           groupDataSorted : false,
                           groupField : ['TypePersonal']
                           }
               });
13:24
Moderators
30/10/2007
Hello,
You have a typo error in your code. You do not have such field defined in colModel.
You have
but you define
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:
49 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