2

I am using aspxgridview, in that gridview i am using batchedit.

I change some values in the gridview and if i am going to next UI means it shows browser alert.

I want to display that browser alert into popup by using JsProperties or something can anyone help me.

This is my browser alert

enter image description here

I want to show my pop up like this. This is the example of row updated event. here i am using jsproperties in cliet side.

enter image description here

2 Answers2

1

Javascript

function onInit(s, e) {
            s.GetUploadControl().viewManager.showValidationError = function (error) {
                lbl.SetText(error.text);
                popup.ShowAtElement(s.GetMainElement());
                //console.log('custom processing: ' + error.text)
            };
        }

aspx code:

<dx:ASPxPopupControl ID="popup" runat="server" ClientInstanceName="popup" PopupHorizontalAlign="Center" 
            PopupVerticalAlign="Middle" AllowDragging="true" HeaderText="Error">
            <HeaderStyle ForeColor="Red" />
            <ContentCollection>
                <dx:PopupControlContentControl>
                    <dx:ASPxLabel ID="lbl" runat="server" ForeColor="Red" ClientInstanceName="lbl"></dx:ASPxLabel>
                </dx:PopupControlContentControl>
            </ContentCollection>
        </dx:ASPxPopupControl>

mention this on binaryimagecolumn

 <ClientSideEvents Init="onInit" />
0
$(window).bind('beforeunload', function(e){
//Instead of this default jquery alert you can use your custom fancy alert or confirmation box which has used in you screenshot above.
 alert(); 
});
Curiousdev
  • 5,668
  • 3
  • 24
  • 38
  • Hi curiousdev, That is not working give another solution. second image is not a broser alert which is i posted on my question it is popup . –  Dec 21 '16 at 11:24
  • Ok to open this pop up which used in second image you are writing some jquery code right and use some jquery plugin for this? – Curiousdev Dec 21 '16 at 11:29
  • i am using java script to open that. I am using that in End call back of gridview and get that in row update event. herethere is no event. how i am used to change browser alert to pop. I dont know how to use that. –  Dec 21 '16 at 11:50
  • Ohh please have a look at this [link](http://stackoverflow.com/a/276739/2534646) this can't possible to change Default dialog box – Curiousdev Dec 21 '16 at 11:51
  • Please use the [edit] link explain how this code works and don't just give the code, as an explanation is more likely to help future readers. See also [answer]. – Jed Fox Dec 21 '16 at 15:09
  • If i am using the above code i met same browser alert only –  Dec 22 '16 at 12:23