Forum



23:14

11/11/2012

I have a c# asp.net application that renders a wide table (many columns) using a Listview control. I am using Release 4.4.4 of jaGrid. I want to use jqGrid's "tableToGrid" function only to freeze the headers, handle vertical and horizontal scrolling, and freeze the 1st column of the resulting table (although I intend to become more familiar with jqGrid's extensive functionality later). The frozen headers and scrolling are working, but I am having a problem with freezing the 1st column.
I am not expicitly creating colNames and colModel for the table columns, since this is handled by the tableToGrid function. Using an example for changing a frozen column I came up with this javascript:
tableToGrid($('#parcelTable'),
{
sortable: false,
multiselect: false,
shrinkToFit: false,
width: 952,
height: 300
})
.jqGrid('destroyFrozenColumns')
.jqGrid("setColProp", "rowEdit", { frozen: true })
.jqGrid("setFrozenColumns")
.trigger('reloadGrid');
When I tried the above, I got the message "Microsoft JScript runtime error: undefined' is null or not an object"
I also tried not chaining the code for the frozen columns statements, using$('#parcelTable').jqGrid('destroyFrozenColumns')
$('#parcelTable').jqGrid("setColProp", "rowEdit", { frozen: true })
$('#parcelTable').jqGrid("setFrozenColumns")
$('#parcelTable').trigger('reloadGrid');and got the same message.
I realize I have probably made some dumb syntax or usage error, but I would also like to know whether I am on the right track, or if this is the best way to do this.
Thanks in advance for any help!
Most Users Ever Online: 715
Currently Online:
25 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