Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Need to freeze column when using jqGrid tableToGrid function
21/02/2013
23:14
Avatar
cat54mom
New Member
Members
Forum Posts: 1
Member Since:
11/11/2012
sp_UserOfflineSmall Offline

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!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
19 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information