custom errortext on row delete jqGrid -


when deleting row in jqgrid, return custom error text when server returns 500 error. using jqgrid asp.net, , grid not seem have "loaderror" event

has done this?

jqgrid defined this

<trirand:jqgrid runat="server" id="jqgrid" shrinktofit="true" width="900px" height="500" pagersettings-pagesize="20" pagersettings-pagesizeoptions="[20,50,100]" onsearching="jqgrid_searching" onsorting="jqgrid_sorting" onrowediting="jqgrid_rowediting" onrowdeleting="jqgrid_rowdeleting">                     <columns>                         <trirand:jqgridcolumn datafield="id" primarykey="true" width="40" visible="false" />                         <trirand:jqgridcolumn datafield="name" searchtype="dropdown" width="55" searchcontrolid="ddlnamefilter"                             headertext="name" editable="true">                             <editclientsidevalidators>                                 <trirand:requiredvalidator />                             </editclientsidevalidators>                         </trirand:jqgridcolumn>                         <trirand:jqgridcolumn datafield="descr" searchtype="dropdown" width="55" searchcontrolid="ddldescrfilter"                             searchable="true" headertext="descr" editable="true">                             <editclientsidevalidators>                                 <trirand:requiredvalidator />                             </editclientsidevalidators>                         </trirand:jqgridcolumn>                         <trirand:jqgridcolumn headertext=" " editactioniconscolumn="true" width="50" editactioniconseditenabled="false"                             cssclass="clickable" />                     </columns>                     <clientsideevents loadcomplete="loadcomplete" columnsort="columnsort" rowdoubleclick="editrow">                     </clientsideevents>                     <toolbarsettings showsearchtoolbar="true" toolbarposition="topandbottom">                     </toolbarsettings>                     <pagersettings norowsmessage="no rows display" />                     <exportsettings exportdatarange="all" />                 </trirand:jqgrid> 

the callback loaderror used process errors during filling/loading of grid. form editing methods delgridrow supports errortextformat callback. use navgrid should define errortextformat callback method of prmdel parameter of navgrid.

additionally recommend use [handlejsonexception] instead of [handleerror] in case of usage asp.net mvc (see the answer details). in other asp.net applications can define error handler application_error in global.asax.cs (see the answer). usage of such handles simplify analyse of error server response inside of errortextformat callback because error information returned json.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -