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_TopicIcon
How to add Columns Dynamically?
18/12/2008
09:13
Avatar
veda
veda
New Member
Members
Forum Posts: 2
Member Since:
18/12/2008
sp_UserOfflineSmall Offline

Right now we define columns for grid like below

colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
colModel :[
{name:'invid', index:'invid', width:55},
{name:'invdate', index:'invdate', width:90},
{name:'amount', index:'amount', width:80, align:'right'},
{name:'tax', index:'tax', width:80, align:'right'},
{name:'total', index:'total', width:80, align:'right'},
{name:'note', index:'note', width:150, sortable:false} ]

I want to define these colNames and colModel dynamically. Adding rows is easy but how to do this?? Is there any solution for this..

Thanks for reply
19/12/2008
13:42
Avatar
daveyoi
daveyoi
Member
Members
Forum Posts: 8
Member Since:
18/12/2008
sp_UserOfflineSmall Offline

Hi Veda,

From what I have read there is no explicit support for dynamic colnames/colmodel but you could build them using something like PHP or ASP and using $.ajax to pull the strings to the clientside.

I am currently working on this myself and have had some success in using PHP to build the arrays required and them passing them to js for inclusion in the jqGrid definition.

Tony would be best to confirm but I believe there is jqGrid support planned in version 3.4?

Hope this Helps

Dave

19/12/2008
22:31
Avatar
veda
veda
New Member
Members
Forum Posts: 2
Member Since:
18/12/2008
sp_UserOfflineSmall Offline

Hi Dave,

Thanks Dave, for ur update. Hope it comes soon, neways me trying this too in JSP, hope i can do it. If u come out with any solution. Please let me know.

Ved.

Forum Timezone: Europe/Sofia

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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information