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
multiselect with rowedit
09/04/2009
00:21
Avatar
Prathap MK
India
Member
Members
Forum Posts: 9
Member Since:
21/10/2008
sp_UserOfflineSmall Offline

hi ....

in my grid am using row edit and multiselect..without multiselect rowedit works very well but when i add multiselect true its not working

14/04/2009
02:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

What actually does not work? Which version do you use? In order to resolve the problem  a min requirment is to post your code.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

15/04/2009
01:01
Avatar
Prathap MK
India
Member
Members
Forum Posts: 9
Member Since:
21/10/2008
sp_UserOfflineSmall Offline

when am adding multiselect with rowedit ,row edit is not working.

my code is as follows

<script type="text/javascript">

var myGrid;

jQuery(document).ready(function(){
  
  var lastsel;
  
  jQuery("#list").jqGrid({
  
    url:'example.asp?q=1',
    datatype: 'xml',
    mtype: 'GET',
    subGrid:true,
    height:212,
    colNames:['act','Sup Id','Name','ContactName','City', 'Country'],     
    colModel :[
     {name:'act', index:'act', width:65, search:false},
     {name:'SupplierID', index:'SupplierID', width:65, sorttype:'int'},
     {name:'CompanyName', index:'CompanyName', width:250, editable: true, editoptions:{size:"20",maxlength:"30"}, sorttype:'int'},
     {name:'ContactName', index:'ContactName', width:100, align:'right'},
     {name:'City', index:'City', width:100, editable: true, edittype: "select", editoptions: {value: getValue() }},
     {name:'Country', index:'Country', hidden: true, editable: true, editoptions:{size:"20",maxlength:"30"}, editrules:{edithidden:true, required:true}}      
    ],
    
    pager: jQuery('#pager'),
    
    rowheight:'100%',
    rowNum:5,
    rowList:[10,20,30],
    sortname: 'CompanyName',
    sortorder: "desc",
    viewrecords: true,
    multiselect:true,
    cellEdit:true,
    subGrid: true,
    subGridUrl : "example11.asp",
    subGridModel :[ { name: ['act', 'Sup', 'Name', 'ContactName', 'City','Country'],
    width : [100, 100, 100,100, 100,100], params: ['SupplierID'] } ],
   
    
    onSelectRow: function(id){    
    
          
     var s;
     s = jQuery("#list").getGridParam('selarrrow');
     
     for(var i=0; i < s.length; i++)
     {
      if(s[i] && s[i]!==lastsel){
      jQuery('#list').restoreRow(lastsel);      
      lastsel=s[i];
      }      
      jQuery('#list').editRow(s[i],true);
     } 
     
    },        
     
    loadComplete: function(){
     var ids = jQuery("#list").getDataIDs();  
     for(var i=0;i<ids.length;i++){
      var cl = ids[i];
      be = "<input style='height:22px;width:20px;' type='button' value='E' onclick=jQuery('#list').editRow("+cl+"); >";
      se = "<input style='height:22px;width:20px;' type='button' value='S' onclick=jQuery('#list').saveRow("+cl+"); />";
      ce = "<input style='height:22px;width:20px;' type='button' value='C' onclick=jQuery('#list').restoreRow("+cl+"); />";
      de = "<input style='height:22px;width:20px;' type='button' value='D' onclick=jQuery('#list').delGridRow("+cl+"); />";
      jQuery("#list").setRowData(ids[i],{act:be+se+ce+de})
     } 
    }, 
        
    imgpath: 'themes/coffee/images',
    caption: 'SUPPLIER TABLE'
    
  }).navGrid('#pager',
    {}, //options
    {height:380, width: 500, reloadAfterSubmit:true}, // edit options
    {height:280,reloadAfterSubmit:true}, // add options
    {height:180, width: 300, reloadAfterSubmit:true}, // del options
    {} // search options
   );  
  
  //jQuery("#t_s1list").height(25).hide().filterGrid("#list",{gridModel:true,gridToolbar:true});
   
  jQuery.jgrid.del = {
  top:100,left:700,
   url: 'delete.asp',
   caption: "MKP Delete",
   msg: "Delete selected record(sss)?",
   bSubmit: "Delete Rec",
   bCancel: "Cancel",
   processData: "Processing..."
   //afterSubmit: function(msg){alert("asdasd"); return true;} 
  };

  jQuery.jgrid.edit = {
   url: 'edit.asp',
   editCaption: "Edit Record",
   addCaption: "Add Record",
   msg: "Edit selected record(s)?",
   bSubmit: "Save",
   bCancel: "Cancel",
   postData:[{Country:'India'}],   
   processData: "Processing..."
   //afterSubmit: function(msg){alert("asdasd"); return true;} 
  };
  jQuery("#list").sortGrid("CompanyName",true);

});

function checksave(result) {
 if (result=="") {alert("Update is missing!"); return false;}
 return true;
}

function getValue(){
 var html1 = $.ajax({
  url: "select.asp",
  async: false
 }).responseText;
 
 return html1;
}

16/04/2009
02:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Do not have time to test, but I do not like this piece of code:

     for(var i=0; i < s.length; i++)
     {
      if(s[i] && s[i]!==lastsel){
      jQuery('#list').restoreRow(lastsel);      
      lastsel=s[i];
      }      
      jQuery('#list').editRow(s[i],true);
     }

Check this again.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

13/05/2009
03:47
Avatar
AKS
Member
Members
Forum Posts: 5
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

i have the same problem.

when "multiselect : false" the following code works fine.

var row = grid.getGridParam('selrow');
    if( row && row >= 0 ){
        if (lastsel && lastsel != -1) {
            grid.restoreRow(lastsel,false, 'clientArray');
        }
        lastsel=row;
        grid.editRow(row,false,pickdates);
    } else {
        alert("Please Select Row to inlineedit!");
    }

but when "multiselect : true" nothing happens. the firefox plugin "firebug" do not show any error.

regards

arne

13/05/2009
03:49
Avatar
AKS
Member
Members
Forum Posts: 5
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

i am using jqGrid 3.4.3

15/05/2009
02:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Currently inline edit does not work with multiselect:true

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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