Hi all,
my probles is my jqgrid code is like this i need treegrid display data
//JGrid control code to show user listing
$("#userlisting").jqGrid({
treeGrid: true,
treeGridModel: "adjacency",
ExpandColumn: "UserName",
autowidth: true,
ExpandColClick: true,
treeIcons: { plus: 'ui-icon-circle-plus', minus: 'ui-icon-circle-minus', leaf: 'ui-icon-person' },
datatype: 'json',
mtype: 'post',
multiselect: false,
colNames: ['', 'ID', 'First Name', 'Last Name', 'User Name', 'Location', 'Customer', 'Locked', 'Login Status', 'CustomerID', 'LocationID', 'DepartmentID', 'IsDefault'],
colModel: [
{ name: 'Options', index: 'Options', width: 110, align: 'center' },
{ name: 'UserID', index: 'UserID', width: 0, align: 'center', hidden: true },
{ name: 'FirstName', index: 'FName', width: 80, align: 'center' },
{ name: 'LastName', index: 'LName', width: 80, align: 'center' },
{ name: 'UserName', index: 'UserName', width: 80, align: 'center' },
{ name: 'LocationName', index: 'LocationName', width: 140, align: 'center' },
{ name: 'CustomerName', index: 'CustomerName', width: 120, align: 'center' },
{ name: 'Locked', index: 'Locked', width: 0, align: 'center', hidden: true },
{ name: 'isLoggedIn', index: 'isLoggedIn', width: 0, hidden: true },
{ name: 'CustomerID', index: 'CustomerID', width: 0, hidden: true },
{ name: 'LocationID', index: 'LocationID', width: 0, hidden: true },
{ name: 'DepartmentID', index: 'DepartmentID', width: 0, hidden: true },
{ name: 'IsDefault', index: 'IsDefault', width: 0, hidden: true }
],
pager: jQuery('#pager'),
rowNum: 30,
height: 'auto',
width: 930,
loadingui: true,
rowList: [30, 60, 90, 120],
sortname: 'UserID',
sortorder: "asc",
gridComplete: function () {
var rowData = $("#userlisting").getDataIDs();
for (var i = 0; i < rowData.length; i++) {
if (jQuery("#userlisting").getCell(rowData[i], 7) == 'True') {
jQuery("#userlisting").setCell(rowData[i], 4, '', 'Login');
}
/* Changed by Amol to set colour of complete row*/
if (jQuery("#userlisting").getCell(rowData[i], 11) == 'True') {
$("#userlisting").jqGrid('setRowData', rowData[i], false, { color: '#347C17' });
}
}
}
});
how to call at MVC Controller please help me its very urgent send my mail address [email protected]
Loading
syam sundarPosted Jul 16, 2014, 12:09 AM
i', trying to bind the below tree menu [left side panel] from web service and json but not successfull pl help us any body in this blog....
http://www.trirand.com/blog/jqgrid/jqgrid.html
jayanta sarkarPosted Oct 3, 2012, 12:19 AM
Nithin Mohan T KPosted Oct 2, 2012, 9:52 PM
Request mechanism is same for normal jqGrid and jQGrid with TreeGrid
you have to pass in :
//url from wich data should be requested
url: '/Home/FilesAdjacencyTreeGridData/'
Define controller action like
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult FilesAdjacencyTreeGridData(FormCollection postData)
{
Example in below URL can help you understand further
http://tpeczek.blogspot.in/2009/12/jqgrid-and-aspnet-mvc-treegrid.html
jayanta sarkarPosted Oct 2, 2012, 12:40 PM
NitRiX ReloadedPosted Oct 2, 2012, 8:14 AM
http://www.codeproject.com/Articles/318820/ASP-NET-MVC-3-0-JqGrid-Unit-Of-Work-Repository-EF
http://haacked.com/archive/2009/04/13/using-jquery-grid-with-asp.net-mvc.aspx