Forum
13:34
29/04/2011
Hi guys,
i am a little confused about these features. With local data in "adjacency" mode sort does nothing, in "nested" sorts only roots items.
But when I use providing data by url sorting works great in nested. But when i want to searching it doesnt work.
I use this code for providing
if( (integer)$_REQUEST["nodeid"] >0) {
$n_lft = (integer)$_REQUEST["n_left"];
$n_rgt = (integer)$_REQUEST["n_right"];
$n_lvl = (integer)$_REQUEST["n_level"];
$n_lvl = $n_lvl+1;
$SQL = "SELECT account_id, name, acc_num, debit, credit, balance, level, lft, rgt FROM accounts WHERE lft > ".$n_lft." AND rgt < ".$n_rgt." AND level = ".$n_lvl." ORDER BY lft";
} else {
// initial grid
$SQL = "SELECT account_id, name, acc_num, debit, credit, balance, level, lft, rgt FROM accounts WHERE level=0 ORDER BY lft";
}
But search request don´t contain $_REQUEST["nodeid"]. So always i send the init grid.
Is here way to do searching on treegrid with providing data?
Here is my config:
var grid = $("#GroupHierarchyGrid");
grid.jqGrid({
url: '/_layouts/SPTools/GroupHierarchyGridProvider.aspx?Source=' + window.location.href,
treedatatype: "xml",
mtype: "POST",
colNames: ["id", "spid", "Title", "Members", "TaskListUrl", "Users"],
colModel: [
{ name: 'id', width: 25, align: "center", hidden: true, key: true },
{ name: 'spid', width: 25, align: "center", hidden: true },
{ name: 'name', search: true, stype: 'text' },
{ name: 'Members', align: "left", search: true, stype: 'text' },
{ name: 'TaskListUrl', align: "left", stype: 'text', search: true },
{ name: 'Users', align: "left", search: true, stype: 'text' }
],
treeGrid: true,
treeGridModel: 'nested',
ExpandColumn: 'name',
height: 'auto',
width: '800',
pager: "#ptreegrid",
caption: "Treegrid"
})
grid.jqGrid('filterToolbar', {
searchOnEnter: true
, stringResult: true
, defaultSearch: 'cn'}
});
Thank You very match
Most Users Ever Online: 715
Currently Online:
42 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