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_Related Related Topics sp_TopicIcon
How to avoid scroll to top, when i click on any Editable Cell in JQGrid subgrid
11/05/2012
10:57
Avatar
licheng
New Member
Members
Forum Posts: 2
Member Since:
11/05/2012
sp_UserOfflineSmall Offline

I'm currently working with jqgrid plugin,and I found a bug which detail information as follow:

"I create a jqgrid who has so many rows that a scroll apears in the page, and when i click on any cell in jqgrid subgrid,the scroll jump to  top. If I set the cellEdit “false”, this problem disappears".

 Are there any ways to  avoid scrolling back to top?  Thank you  advance.

var portSettingOpt = $.extend({}, jqgridBaseOpt, {
    data: portSettingData,
    colNames:[$.i18n.port, $.i18n.name, $.i18n.portclass, $.i18n.linkstate, $.i18n.autoneg, $.i18n.speed,
                   $.i18n.duplex, $.i18n.enableVlan, $.i18n.vlanID],
    altRows: true, //Set a zebra-striped grid
    altclass: 'jqgridAltclass',   
    cmTemplate: {sortable: false}, //All columns UNsortable            
    colModel:[ {name:'settingindex',index:'settingindex', width:50, sorttype: "int",
                 cellattr: disableStyle},
                {name:'name',index:'name', width:100, editable: true,  editrules:{custom:true, custom_func:validateTextInput},
                 editoptions: {"class":"validate[required,maxSize[29]] text-input"}},
                {name:'portclass',index:'portclass', width:80, editable: false,
                 edittype: "select", editoptions: { value: classLabel[0]+":"+classLabel[0]+";"+classLabel[1]+":"+classLabel[1]+";"+classLabel[2]+":"+classLabel[2]}/*,
                cellattr: monitorCellAttr*/},
                {name:'linkstate',index:'linkstate', width:120,
                cellattr: function(rowId, tv, rawObject, cm, rdata){
                  return (tv == stateLabel[1])?'style="color:green;"':'style="color:red;"';
                }},
               {name:'autoneg',index:'autoneg', width:110, editable: true,
                edittype: "select", editoptions: { value: autonegLabel[0]+":"+autonegLabel[0]+";"+autonegLabel[1]+":"+autonegLabel[1]}/*,
                cellattr: negoAttr*/},
               {name:'speed',index:'speed', width:60, sortable:"int", editable: true,
                edittype: "select", editoptions: { value: function(){
                                                   var indexR=$("#tbl_portsetting").getGridParam("selrow");
                                                   if ($("#tbl_portsetting").getRowData(indexR).portclass == "Monitor")
                                                           return "10:10;100:100;1G:1G";
                                                   else  
                                                           return "10:10;100:100";
                                                 }},
                cellattr: portSpeedModeAttr},
               {name:'duplex',index:'duplex', width:70, editable: true,
                edittype: "select", editoptions: { value: duplexLabel[0]+":"+duplexLabel[0]+";"+duplexLabel[1]+":"+duplexLabel[1]},
                cellattr: portSpeedModeAttr},
               {name:'enableVlan',index:'enableVlan', width:95, editable: true,
                edittype: "select", editoptions: { value: enableVlanLabel[0]+":"+enableVlanLabel[0]+";"+enableVlanLabel[1]+":"+enableVlanLabel[1]},
                cellattr: vlanAttr},
                {name:'vlanID',index:'vlanID', width:70,
                cellattr: disableStyle}],
    cellEdit: true,
    cellsubmit: 'clientArray', 
    afterEditCell: afterCellEdit,
    afterSaveCell: afterSaveCell,
    loadComplete: function(){
          return;
    },
    prmNames: {id:"settingindex"},       
    rowNum:28,        
    pager: '#pager_portsetting'
  });

07/06/2012
01:27
Avatar
dinesh
Member
Members
Forum Posts: 5
Member Since:
16/08/2011
sp_UserOfflineSmall Offline

I've been waiting for the solution to the same problem....i don't think its out yet. Check this out from 09/2009 till 10/2011 Someone provided a tip but didn't work for me!

11/07/2012
04:48
Avatar
licheng
New Member
Members
Forum Posts: 2
Member Since:
11/05/2012
sp_UserOfflineSmall Offline

dinesh said:I've been waiting for the solution to the same problem....i don't think its out yet. Check this out from 09/2009 till 10/2011 Someone provided a tip but didn't work for me!


          3Q very much, I tried and it worked for me!Smile

Forum Timezone: Europe/Sofia

Most Users Ever Online: 496

Currently Online:
26 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information