Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bsolteam

Pages: 1 ... 6 7 [8]
106
Help for ParamQuery Pro / How to get rowIndex through cell value
« on: April 22, 2014, 10:13:04 am »
Hi,

I tried to get rowIndex by using the cell value. For example if am giving the cell value like VOYAGE it needs to print the rowIndex like 2. I used the following code

       var obj = $( "#VoyageDetails_tab_main" ).pqGrid( "getRowIndx", {tr:"VOYAGE HEIGHT"});
       var rowIndx = obj.rowIndx;
       alert(rowIndx);

am always getting undefined only. What i need to put in that colored area or else what i did wrong. Any one help me.

107
Hi,can any one help me !!  i am facing problem while setting json ajax response into pqGrid, i am able to see the json array response in the correct json format as i  see while giving an alert..Here is my code snippet

 
$.ajax({
       type : "get",   
      
       url: "/employee.htm",
      cache: false,            
      success: function(response){
         alert(response);

          $("#datagrid").jqGrid({
              contentType: "application/json; charset=utf-8",
              datatype: "json",
              data:response,
              colNames:['description','standard_voyage1', 'standard_voyage2', 'standard_voyage3','id'],
              colModel:[
             {name:'id',index:'id', key:true, width:100,editable:true},
             {name:'description',index:'description', width:100,editable:true},
                  {name:'standard_voyage1',index:'standard_voyage1', width:100,editable:true},
                  {name:'standard_voyage2',index:'standard_voyage2', width:100,editable:true},
                  {name:'standard_voyage3',index:'standard_voyage3', width:100,editable:true}
                 
              ],
              rowNum:10,
              rowList:[6,3],
              loadonce: true,
              pager: '#navGrid',
              sortname: 'id',
              sortorder: "asc",
              emptyrecords: "Tidak ada data",
              height: "auto", //210,
              viewrecords: true,
              width:600,
              jsonReader : {
                  root: "rows",
                  page: "page",
                  total: "total",
                  records: "records",
                  repeatitems: false,
                  cell: "cell",
                  id: "id"
            },
              onSelectRow: function(id) {
                  var getID = $(this).jqGrid('getCell', id, 'id');
              },
             
              caption:"JQ GRID"
          });

Pages: 1 ... 6 7 [8]