Click here to Skip to main content
16,021,209 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi good evening..........

I am working on jqgrid in there i have added tow custome buttons for add and edit..

but the problem occurs when i go for searching.....

THe search dialog dont get close when searching gets finish......

the code for jqgrid is

C#
$("#State").jqGrid({
               url: 'Handlers/StateHandler.ashx',
               editurl: 'Handlers/StateHandler.ashx',
               datatype: "xml",
               mytype: "GET",
               width: 736,
               height: "100%",
               colNames: ['StateName', 'CountryName'],
               colModel: [
                               { name: 'StateName', index: 'StateId', editable: true,edittyp: 'text', editrules: { required: true} },
                               { name: 'CountryName', index: 'CountryId', editable: true, sorttype: 'text', editrules: { edithidden: true }, edittype: "select",
                                   editoptions: { dataUrl: 'Handlers/dropdown.ashx?pageName=State' }
                               }
               ],
               pager: "#pager",
               caption: "State",
               sortName: 'StateId',
               rowNum: 10,
               sorttype: 'asc',
               rowList: [10, 20, 30],
               viewrecords: true
           }).navGrid("#pager", { edit: true, add: true, del: true, search: true },           
              {closeAfterSearch: true, drag: true, closeOnEscape: true, afterShowSearch: function() {
               $.post("Handlers/StateHandler.ashx?valSearch=true", {}, function(data) { });
              }}
           );


C#
$("#OtherMasterGrid").navButtonAdd('#pager1', { position: "first", caption: "",title:"Add new "+tableName, buttonicon: "ui-icon-plus",onClickButton: function() {
               operation = "add";
               window.location = NavigatePageName+"?Event=add&tableName=" + tableName + "&MenuId=" + $(".MenuId").val();

                }
            }

            );


C#
$("#OtherMasterGrid").navButtonAdd('#pager1', { position: "first", caption: "",title:"Edit selected "+tableName, buttonicon: "ui-icon-pencil", onClickButton: function() {
            operation = "edit";
            if (parentRowId == null) {
                alert("Please,select row");
            }
            else
               {
                   window.location.href = NavigatePageName+'?rowid=' + parentRowId + '&Event=edit&tableName=' + tableName + "&MenuId=" + $(".MenuId").val();
               }
          }
         }
      );

If you gwt that why search dialog is not get closed then please let me know......

THanx in advance
Posted
Updated 30-Jul-11 1:56am
v2
Comments
walterhevedeich 30-Jul-11 8:00am    
That's a lot of code. have you, by chance, tried to debug it using Firebug?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900