c# - asp.net how to prevent page post back dev express grid -



c# - asp.net how to prevent page post back dev express grid -

i have asp.net page on have dev express grid,when user click on sorting or grouping need show warring message if click ok state lose , on cancel need pervent sorting or grouping.

<asp:content id="content1" contentplaceholderid="contentplaceholder1" runat="server"> <div class="legend legend-right"> <div class="legend-item legend-item-normal"> </div> <span>normal</span> <div class="legend-item legend-item-normal" style="background-color: <%=this.skillsetdraftchangedbackgroundcolor%>!important;"> </div> <span>rating items changed</span> </div> <span id="spanhanlder" ></span> <asp:updatepanel id="uprequester" runat="server"> <contenttemplate> <asp:label id="lblresource" runat="server" text=""></asp:label> <asp:panel runat="server" id="pnlstatus" borderwidth="1px" height="33px" width="400px" cssclass="panelstatus"> <cmacgm:row id="rowtrainingstatustextbox" runat="server" label="status :" width="100%" positionnextelement="right" widthlabel="10px" cssclass="rowstatus"> <asp:textbox runat="server" id="txtstatus" width="80%" readonly="true" font-bold="true" /> </cmacgm:row> </asp:panel> <cmacgm:userform runat="server" id="userform" /> <cmacgm:form runat="server" id="formskillsrating" title="level of qualification" formhorizontalalign="center"> <cmacgm:row id="rowskillsrating" runat="server" width="100%"> <dxwgv:aspxgridview id="gvskillsrating" runat="server" clientinstancename="gvskillsrating" autogeneratecolumns="false" width="100%" keyfieldname="skillsetid" onhtmlrowcreated="gvskillsrating_onhtmlrowcreated" ondatabound="gvskillsrating_ondatabound" onhtmlrowprepared="gcskillsrating_onhtmlrowprepared" oncustomunboundcolumndata="gcskillsrating_customunboundcolumndata"> <columns> <dxwgv:gridviewdatacolumn caption="skill grouping id" fieldname="groupid" width="100px" visible="false" /> <dxwgv:gridviewdatacolumn caption="skill group" visible="true" fieldname="groupname" width="400px" groupindex="0" settings-allowsort="false" /> <dxwgv:gridviewdatacolumn caption="skill set id" fieldname="skillsetid" visible="false" /> <dxwgv:gridviewdatacolumn caption="skill" visible="true" fieldname="title" width="400px" settings-allowsort="false" headerstyle-cssclass="no-underline"/> <dxwgv:gridviewdatacolumn caption="skillrating" fieldname="ratingid" visible="false" /> <dxwgv:gridviewdatacolumn caption="isavaliableforresource" fieldname="avaliableforresource" visible="false" /> <dxwgv:gridviewdatacolumn caption="changedaftervalidation" fieldname="changedaftervalidation" visible="false"> </dxwgv:gridviewdatacolumn> <dxwgv:gridviewdatatextcolumn fieldname="groupdescription" unboundtype="decimal" visible="false"> </dxwgv:gridviewdatatextcolumn> <dxwgv:gridviewdatacolumn caption="rating" headerstyle-cssclass="no-underline"> <dataitemtemplate> <asp:dropdownlist id="ddlskillrating" runat="server"> </asp:dropdownlist> </dataitemtemplate> </dxwgv:gridviewdatacolumn> <dxwgv:gridviewdatacolumn caption="reviewer rating" visible="true"> <dataitemtemplate> <asp:dropdownlist id="ddlreview" runat="server"> </asp:dropdownlist> </dataitemtemplate> </dxwgv:gridviewdatacolumn> </columns> <clientsideevents begincallback="function(s, e) { var reply = confirm('warning!'); if (answer) { iscancelcallback=false; } else { homecoming aspxclientutils.preventevent(e); }}" /> <settingsbehavior allowsort="false" sortmode="default" autoexpandallgroups="true" /> <settings showfilterrow="false" showfooter="true" showheaderfilterbutton="false" showgroupedcolumns="true" /> <settingspager pagesize="100" /> <groupsummary> <dxwgv:aspxsummaryitem fieldname="groupid" summarytype="count" displayformat="{0}" /> </groupsummary> </dxwgv:aspxgridview> </cmacgm:row> <cmacgm:row id="row2" runat="server" cssclass="rightbutton"> <asp:button id="btnskillratingsave" runat="server" text="save" buttontype="default" validationgroup="annualratingvalidationgroup" width="80px" onclick="btnskillratingsave_click" /> <asp:button id="btnskillratingsubmit" runat="server" text="submit" buttontype="default" validationgroup="annualratingvalidationgroup" width="80px" onclick="btnskillratingsubmit_click" /> <asp:button id="btnskillratingvalidate" runat="server" text="validate" buttontype="default" validationgroup="annualratingvalidationgroup" width="80px" onclick="btnskillratingvalidate_click" /> </cmacgm:row> </cmacgm:form> </contenttemplate> </asp:updatepanel>

what should cancel ajax post in case of cancel or improve solution thanks

var reply = confirm('warning!'); if (answer) { iscancelcallback=false; } else { homecoming aspxclientutils.preventevent(e); }}" />

thanks

to this, need handle gridview's client-side columngrouping , columnsorting events. set e.cancel parameter true if need prevent callback.

c# jquery asp.net devexpress

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -