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
form editing in 3.5 Beta
26/05/2009
20:07
Avatar
soverture
New Member
Members
Forum Posts: 2
Member Since:
26/05/2009
sp_UserOfflineSmall Offline

Hello,

I had also posted in comments section in 3.5 Beta 2. As suggested by tony I have installed jqgrid.min.js 3.5 beta 2. But I errors with firebug on line 7. I am not sure if this is the reason that after editing form ( add, edit, delete) processing..( processData) get stuck. With Delete the modal window after deleting does not get close after deletion. This is my code!!

I am using struts 2 and loading the data with json. I want to actually use multiselelct but currenlty I have disabled till I solve this issue!!!.

$("#addrow").click(function(){
           jQuery("#incomelist").editGridRow("new",
                   {addCaption:"Add Income",height:200,width:400,
                       jqModal:false,closeOnEscape:true,
                       url:"/bp/app/workout/income/add",
                       bSubmit:"Save",
                       closeAfterAdd:true,
                       reloadAfterSubmit:false,
                        afterSubmit:function reloadGrid(){
                           jQuery("#incomelist").trigger("reloadGrid");
                           return true;
                   
                         }
                       }
            );
        });

        // edit row function
        $("#editrow").click(function(){
                    var gr = jQuery("#incomelist").getGridParam('selrow');
                   
                    if (gr!=null){
                        //editgr=jQuery("#incomelist").getGridParam('selarrrow');
                        //alert(editgr);
                        jQuery("#incomelist").editGridRow(gr,
                                {
                                    editCaption:"Edit Income",bSubmit:"Save",
                                     url:"/bp/app/workout/income/edit",
                                     jqModal:false,closeOnEscape:true,height:200,width:400,
                                     beforeShowForm : function (formid){
                                        $("#pData, #nData",formid).hide();
                                     },
                                    closeAfterEdit:true,
                                    reloadAfterSubmit:false,
                                    afterSubmit:function reloadGrid(){
                                      jQuery("#incomelist").trigger("reloadGrid");
                                      return true;
                                          
                                    }
                                }
                                  
                        );
                //end of if grid            
                } else {
                    alert("Please select a row for editing");
                }   
                   
        });
        
       
        // delete row function
        $("#deleterow").click(function(){
            var gr = jQuery("#incomelist").getGridParam('selrow');
            //getSelectedRow();
            if( gr != null ) {
                alert(gr);
                jQuery("#incomelist").delGridRow(gr,{reloadAfterSubmit:false,
                    url:"/bp/app/workout/income/delete",jqModal:false,closeOnEscape:true,
                       caption:"Delete Income(s)",
                       afterSubmit:function reloadGrid(){
                            jQuery("#incomelist").trigger("reloadGrid");
                            return true;
                            }
                });
                                                       
            }
            else {
                alert("Please Select Row to delete!");
            }

        });

27/05/2009
02:05
Avatar
prbabu
Member
Members
Forum Posts: 22
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

Did you try the "loader" or the source code from GitHub?

I had issues when using the "loader" files, but things work fine with the source code.

27/05/2009
02:26
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

afterSubmit event should return array and not a value (see docs). Also to work this

 afterSubmit:function reloadGrid(){
       jQuery(”#incomelist”).trigger(”reloadGrid”);
        return [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:
94 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