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
+++edit modal issue
10/01/2009
14:22
Avatar
faizaliqbaal
Member
Members
Forum Posts: 10
Member Since:
21/12/2008
sp_UserOfflineSmall Offline

Hi  Tony/All

I have an app in production using jqgrid.

the problemis this --

i have a grid with pagination enabled .....

if i select a row and edit it on the same page it just works fine ...but when i move to next page and select another row , the edit dialogue still loads the previous selection.

Also when i move to the last page initally itself and then try to edit the row the edit dialogue doesnt work properly...even i move back to the first page.

Can u please help...the app is already in production and users are getting severly effected

here is my grid code

$("#msgKeysTable").jqGrid({
datatype: 'json',
 url: "keyOperations.htm?connId="+connId+"&appId="+appId+"&paramName=messagesKeyOps",
colNames:['Message Name','Message Text','Type','Description','Category','Severity','Created By','languageCode'],
colModel :[
            {name:'messageName',index:'messageName', width:150,align:'left',sortable:true,editable:false},
            {name:'messageText',index:'messageText', width:150, align:'left',sortable:true,editable:false},
            {name:'type',index:'type', width:125, align:'left',sortable:true,editable:false,edittype:"select",editoptions:{value:"50_PCT_EXPANSION_PROMPT:50_PCT_EXPANSION_PROMPT;OTHER:OTHER;MENU:MENU;TITLE:TITLE;100_PCT_EXPANSION_PROMPT:100_PCT_EXPANSION_PROMPT;WARN:WARN;QUESTION:QUESTION;TOKEN:TOKEN;CRITICAL:CRITICAL;REJECT:REJECT;WARNING:WARNING;ERROR:ERROR;NOTE:NOTE;ACTION:ACTION;30_PCT_EXPANSION_PROMPT:30_PCT_EXPANSION_PROMPT;SUMMARY:SUMMARY;HINT:HINT;PROMPT:PROMPT"}},
            {name:'description',index:'description', width:150, align:'left',sortable:true,editable:false},
            {name:"category",index:'category',width:70,editable:false,edittype:"select",editoptions:{value:"PRODUCT:PRODUCT;SECURITY:SECURITY;SYSTEM:SYSTEM;USER:USER"}},
            {name:"severity",index:'severity',width:90,align:"right",editable:false,edittype:"select",editoptions:{value:"CRITICAL:CRITICAL;WARNING:WARNING;ERROR:ERROR"}},
            {name:"createdBy",index:'createdBy',width:77,align:"center",editable:false},
            {name:'languageCode',index:'languageCode', hidden:true,editable:false}

            ],
       
        pager: $('#pagerMsgKeysTable'),
        rowNum:5,
        rowList:[5,10],
        sortname: "id",
        sortorder: "desc",
        viewrecords: true,
        multiselect: false,
        imgpath: 'images'
        }).navGrid("#pagerMsgKeysTable",{refresh: false,edit: false, add: false, del: false, search: false});

and here is my edit button's code

$("#editRowMessages").click(function(){
        makeMsgRowEditable("msgKeysTable");
            $("#msgKeysTable").setColProp('messageName',{editable:false}) ;
       
       
            var gr = $("#msgKeysTable").getGridParam('selrow');
            console.log("---------------------------------------------------------------"+gr);
            var rowData=$("#msgKeysTable").getRowData(gr);
            if( gr != null )
            {
            console.log(rowData);
           
            $("#msgKeysTable").editGridRow(gr,{closeAfterEdit:true,reloadAfterSubmit:false,modal: true,drag: true,editCaption: "Edit Message",bSubmit:"Save Changes",bCancel:"Cancel Changes",url:"keyOperations.htm?paramName=messagesKeyOps&opName=editMessage&messageName="+rowData.messageName});
            }
            else
            {
            alert("Please Select Row");
            makeMsgRowNonEditable("msgKeysTable");
            }
    });

12/01/2009
09:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Hello check the id of the row - What you have if you alert the variable gr?

Also make alert(gr)

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.

22/01/2009
23:40
Avatar
faizaliqbaal
Member
Members
Forum Posts: 10
Member Since:
21/12/2008
sp_UserOfflineSmall Offline

Thanks a ton tony...yes indeed the id was screwed up.

Thanks a ton u  saved the day 🙂

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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