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
All nodes expanding on click
10/01/2012
15:23
Avatar
jbenckert
Member
Members
Forum Posts: 3
Member Since:
29/12/2011
sp_UserOfflineSmall Offline

I've got the tree grid data setup correctly and returning via json and all is well however there is one problem I can't track down.  When I click on any root node, they all expand.  The heirarchy is obviously correct but I'm not sure what I've done wrong.  Configuration is below.  Thanks in advance for any help that someone can provide.

Thanks

-Joe Benckert

//Custom parameter values

var listDataURL = '/cms/getDashboardCampaignData.do';

var initialPageSize = 20;

var maxRecords = 10000;

var pageSizes = [initialPageSize, 40, 80, maxRecords];

// jqGrid Configurations

jq(function() {

jQuery("#campaignPerformanceGrid").jqGrid({

url:listDataURL,

datatype: 'json',

mtype: 'POST',

colNames:['campaignID', 'flightID', 'Name', 'Start','End', 'Proj %', 'Ordered', 'Delivered', 'CTR','Priority','Interval',''],

colModel:[

{name:'campaignId',index:'campaignId', hidden:true, key:true},

{name: 'flightId', index: 'flightId', hidden: true},

{name:'name',index:'name',sorttype:"text", width:400},

{name:'startDateStr',index:'startDate',sorttype:"date", width:200},

{name:'endDateStr',index:'endDate',sorttype:"date", width:200},

{name:'projectedPercentage',index:'completionPercentage',sorttype:"float", width:200},

{name:'ordered',index:'ordered',sorttype:"int"},

{name:'delivered',index:'delivered',sorttype:"int"},

{name:'ctr',index:'ctr',sorttype:"float"},

{name:'priority',index:'priority',sorttype:"int"},

{name:'interval',index:'interval',sorttype:"string"}, //has mouseover

{name:'flightIdMoreInfo', index:'flightId', formatter:moreInfoFormatter, sortable:false}

],

postData: { },

rowNum:initialPageSize,

rowList:pageSizes,

height: "auto",

width: 1200,

//autowidth: true,

altRows : true,

ignoreCase: true, //Filter and Sort is case-insensitive

pager: '#pager',

viewrecords: true,

sortname: 'name',

sortorder: "asc",

caption:"",

emptyrecords: "No data found",

loadonce: true,

loadComplete: setupMoreInfo,

jsonReader : {

root: "rows",

page: "page",

total: "total",

records: "records",

repeatitems: false,

cell: "cell",

id: "id",

subgrid: {

root:"rows",

repeatitems: false,

cell:"cell"

}

},

treeGrid: true,

treedatatype: 'json',

treeGridModel : 'adjacency',

treeReader: { level_field: 'tree_level', parent_id_field: 'tree_parent', leaf_field: 'tree_leaf', expanded_field: 'tree_expanded', loaded: 'tree_loaded', icon_field: 'tree_icon' },

ExpandColumn: 'name'

});

10/01/2012
15:47
Avatar
jbenckert
Member
Members
Forum Posts: 3
Member Since:
29/12/2011
sp_UserOfflineSmall Offline

I've solved my own problem.

If anyone is interested, I had to add an Id to each tree item beyond the row Ids of the things in the database.  This had to be done because the children were in another database table.

Thanks.

-Joe

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
38 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