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
Filter in treegrid
19/10/2012
12:31
Avatar
mikechris
New Member
Members
Forum Posts: 2
Member Since:
19/10/2012
sp_UserOfflineSmall Offline

Hello

I'm new to jqgrid, but very impressed of all the possibilties! Congrats!

I'm trying to get my treegrid example to filter (local-data) but it won't. Any ideas what I'm dooing wrong?





<script type="text/javascript">

$(



function () {



'use strict';



var data=[

{ id:



"1", Aktion: "Aktion 1", Datum: "10.1.2012", level: "0", parent: "null", isLeaf: false, expanded: false },

{ id:



"2", Aktion: "Aktion 2", Datum: "9.1.2012", level: "1", parent: "1", isLeaf: false, expanded: false },

{ id:



"5", Aktion: "Aktion 5", Datum: "7.1.2012", level: "2", parent: "2", isLeaf: true, expanded: false },

{ id:



"4", Aktion: "Aktion 4", Datum: "6.1.2012", level: "1", parent: "1", isLeaf: true, expanded: false },

{ id:



"3", Aktion: "Aktion 3", Datum: "8.1.2012", level: "0", parent: "null", isLeaf: true, expanded: false },

];



var grid = $("#treegrid");

grid.jqGrid({

datatype:



'local',

treeGrid:



true,

treeGridModel:



'adjacency',

treedatatype:



'local',

ExpandColumn:



'Aktion',

toolbar: [



true, "bottom"],

colNames: [



"id", "Aktion", "Datum"],

colModel: [{

name:



'id',

index:



'id',

width: 1,

hidden:



true,

key:



true

}, {

name:



'Aktion',

index:



'Aktion',

width: 120,

hidden:



false,

sorttype:



'text',

},

{

name:



'Datum',

index:



'Datum',

width: 120,

hidden:



false,

sortable:



true,

sorttype:



'date'

}, ],

width: 500,

sortname:



'id',

pager:



false,

imgpath:



'/ui-lightness/images',

caption:



'',

loadonce:



true

})

grid[0].addJSONData({ total: 5, page: 1, records: data.length, rows: data });

grid.jqGrid(



'filterToolbar', { stringResult: true, searchOnEnter: true });

});



</script>

Kind regards Mike

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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