NikhilB
November 16, 2011, 5:47am
1
Hi,
Facing one issue regarding the custom command button.
I have given an alert in CustomCommand event of the GridWeb which says that "In Custom Command".But its not giving that command msg. I have attached the demo application.please let me know what needs to add/update
Regards,
Nikhil
Hi,
The CustomCommand event is not fired (to give alert message on the client side) when you enable AJAX, so you need to disable the GridWeb’s Ajax mode, see the updated code segment from your project, it will work fine:
//Set GridWeb properties
GridWeb1.EnableAJAX = false;
GridWeb1.EnableClientColumnOperations = false;
GridWeb1.EnableClientFreeze = false;
GridWeb1.EnableClientMergeOperations = false;
GridWeb1.EnableClientRowOperations = false;
GridWeb1.EnableStyleDialogbox = false;
NikhilB
November 16, 2011, 10:46pm
3
Hi Amjad,
But my requirement is both autocalculation as well as custom buttons...
Is there any work around for above situation?
Regards,
Nikhil
NikhilB
November 18, 2011, 3:34am
4
Hi Amjad,
please tell me about Custom Command Buttons in Ajax Enabled WebGrid also...As this is also required to me very urgently
Regards,
Nikhil
Hi,
I think you may try to use your code in similar ways, e.g
if(!Request.Url.ToString().Contains(“acw_ajax”){
//your code
}
NikhilB
November 18, 2011, 4:31am
6
Hi Amjad,
I have tried above code before GridLoad, but its not working, i have javascript in the code but no call for it
Regards,
Nikhil
Hi, Please change the code:
if (!Page.IsPostBack)
to the following code:
if (!Page.IsPostBack&&!Request.Url.ToString().Contains("acw_ajax"))
Since that, because of the code
“EnableAjax=”True”
the webpage will called by a url which contains
“acw_ajax” , so please skip the url process , then the page will work well.
NikhilB
November 20, 2011, 10:47pm
8
Hi,
We want to call javascript in the GridWeb1_CustomCommand event but it doesnt execute the javascript.
Is there any way to call it...
please suggest me as it is on very urgent basis.....
Regards,
Nikhil