subgrid

Dynamically Expand Subgrid in a loop - JQGrid

↘锁芯ラ 提交于 2019-12-02 03:39:25
I have Grid with a subgrid using subGridRowExpanded. And I want to dynamically expand some rows of the grid so I wrote following in GridComplete Event of First Grid. ids is array of row ids of my Grid for(int i =0; i< ids.length; i++) { //Checking with condition $("#myGridName").expandSubGridRow(ids[i]); } I also tried with following code, But for some reason checkboxes in GridComplete of second level, is added only for last expanded row. $("#myGridName").expandSubGridRow(ids[0]); $("#myGridName").expandSubGridRow(ids[1]); Above code expands appropriate rows. But, In GridComplete event of

JqGrid with subgrid and local data not working in IE9 - throws - “SCRIPT600: Invalid target element for this operation”

≡放荡痞女 提交于 2019-12-02 03:03:28
I am new to JQGRID and I am using version 4.7.1. I am trying to create JQGRID with SUBGRID. The code is working as expected in Google chrome, but I am getting the below mentioned error in IE9. SCRIPT600: Invalid target element for this operation. jquery.jqGrid.src.js, line 1639 character 6 How can I resolve the error and make it work in IE9. Kindly do the needful.Thanks in advance. <html> <head> <title>My First Grid</title> <link rel="stylesheet" type="text/css" media="screen" href="css/jquery- ui.css" /> <link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" /> <script

postData for subgrid in jqgrid not working?

旧街凉风 提交于 2019-12-01 05:49:11
Hi I have a jqgrid with a subgrid which calls into a servlet. I am sending some data to the servlet using POST but the same data doesn't get sent when the call for the subgrid is made. This is my JS: $("#testsTable").jqGrid({ mtype: "POST", url: "GetCurrentStatusServlet", postData: {buildPath :"C:\\Test\\01"}, datatype: "xml", colNames:['TestCase Name', 'Last Update', 'Status'], colModel:[ {name:'name',index:'name', width:90}, {name:'lastupdate',index:'lastupdate', width:100}, {name:'status',index:'status', width:80, align:"right"} ], rowNum:10, autowidth: true, rowList:[10,20,30], pager: $('

postData for subgrid in jqgrid not working?

家住魔仙堡 提交于 2019-12-01 03:43:31
问题 Hi I have a jqgrid with a subgrid which calls into a servlet. I am sending some data to the servlet using POST but the same data doesn't get sent when the call for the subgrid is made. This is my JS: $("#testsTable").jqGrid({ mtype: "POST", url: "GetCurrentStatusServlet", postData: {buildPath :"C:\\Test\\01"}, datatype: "xml", colNames:['TestCase Name', 'Last Update', 'Status'], colModel:[ {name:'name',index:'name', width:90}, {name:'lastupdate',index:'lastupdate', width:100}, {name:'status'

Disable subgrid expansion for selected rows of jqGrid

荒凉一梦 提交于 2019-11-30 14:16:46
问题 Problem: jqGrid with subgirds. I want to disable the expand/collapse functionality for some rows of the main grid. 回答1: I actually found a way: grid.jqGrid('setGridParam',{ afterInsertRow: function(rowid, aData, rowelem) { var rowData = grid.getRowData(rowid); if(**Condition**){ $('tr#'+rowid, grid) .children("td.sgcollapsed") .html("") .removeClass('ui-sgcollapsed sgcollapsed'); } } }); There was a bit of a problem. The code @Frank removed the icon, but the 'click' event was still triggered.

Disable subgrid expansion for selected rows of jqGrid

徘徊边缘 提交于 2019-11-30 09:43:13
Problem: jqGrid with subgirds. I want to disable the expand/collapse functionality for some rows of the main grid. I actually found a way: grid.jqGrid('setGridParam',{ afterInsertRow: function(rowid, aData, rowelem) { var rowData = grid.getRowData(rowid); if(**Condition**){ $('tr#'+rowid, grid) .children("td.sgcollapsed") .html("") .removeClass('ui-sgcollapsed sgcollapsed'); } } }); There was a bit of a problem. The code @Frank removed the icon, but the 'click' event was still triggered. Trying to unbind the 'click' event doesn't seem to work, probably because it is attached later on ( maybe

How to show jqGrid subgrid on certain rows only? [duplicate]

吃可爱长大的小学妹 提交于 2019-11-27 07:19:10
问题 This question already has an answer here: Hide expand/collapse symbol or deactivate spec. rows in jqGrid subgrid 1 answer I created a grid with multiple sub-grid levels using jqGrid and with a little help from this answer. Here is what I have currently: I am trying to modify it in a way to only show the sub grid if there is data to show. In other words if the count > 0 . Logically I tried to add a condition (pseudo code below, based on previously mentioned answer): Original Code var

JQGrid - How Can We make an Custom Row Detail

别等时光非礼了梦想. 提交于 2019-11-27 05:05:49
Some one give me the some Sample Code to make my Grid like this.I read in document that jqgrid just supports subgrid. like this page in Hierachy http://trirand.net/demoaspnetmvc.aspx thanks ! On the page Custom Row Detail you can see how you can use subGridRowExpanded event handle to show custom HTML data as subgrid data. In general if you have any standard jqGrid you can implement the same very easy. You should just add subGrid: true to the grid and define subGridRowExpanded which append html to the subgrid: subGridRowExpanded: function(subgrid_id, row_id) { var html = "<span>Some HTML text

Mapping JSON data in JQGrid

Deadly 提交于 2019-11-27 04:54:41
I am using jqGrid 3.6.4 and a jquery 1.4.2 . in my sample i am getting following json data format & i want to map these json data into rows of a jqgrid { "page": "1", "total": 1, "records": "6", "rows": [ { "head": { "student_name": "Mr S. Jack ", "year": 2007 }, "sub": [ { "course_description": "Math ", "date": "22-04-2010", "number": 1, "time_of_add": "2:00", "day": "today" } ] } ] } my jqgrid code is as follows jQuery("#"+subgrid_table_id).jqGrid({ url:"http://localhost/stud/beta/web/GetStud.php?sid="+sid, dtatype: "json", colNames: ['Stud Name','Year','Date'.'Number'], colModel: [ {name:

jqGrid : issue loading nested sub grid with local datatype

坚强是说给别人听的谎言 提交于 2019-11-26 22:56:45
I'm trying to get nested subgrids to work using jqGrid with local data. I've searched around quite a bit but haven't been able to find a solution. Here is a simplified sample of my code: var mainGridData = [ // main grid data { id: "m1", col1: "11", col2: "12" }, { id: "m2", col1: "21", col2: "22" }, { id: "m3", col1: "31", col2: "32" } ]; var firstSubgrid = { m1: [ // data for subgrid for the id=m1 { id: "s1a", c1: "aa", c2: "ab", c3: "ac" }, { id: "s1b", c1: "ba", c2: "bb", c3: "bc" }, { id: "s1c", c1: "ca", c2: "cb", c3: "cc" } ], m2: [ // data for subgrid for the id=m2 { id: "s2a", c1: "xx