Hi,
I'm trying to add a clientside script to my grid which will fire upon initialization. I've added the following in Page_Load:
this.UltraWebGrid1.DisplayLayout.ClientSideEvents.InitializeLayoutHandler = "alert('Hello')";
The alert is displayed allright, but after the alert I get a pop-up saying: "There is a problem with the event handler method: 'alert('Hello')'. Please check the method name's spelling."
Anyone knows what I am doing wrong?
I've coded the way you explained. Then too I m facing the same issue.
I am using AJAX. The issue is occuring after using UpdatePanel (Ajax).
If I remove the UpdatePanel, every client side event is catching up properly.
Following is the error:
---------------------------Microsoft Internet Explorer---------------------------There is a problem with the event handler method: 'ultraWebGridApplication_InitializeLayout'.
Please check the method name's spelling.---------------------------
Pls suggest.
You can't put inline JavaScript to a client-side event handler of WebGrid, nor can you choose the parameters that are passed.
Instead, define a JavaScript function on your page that calls "alert('Hello')", and put the name of that function into the property you used. For instance:
function ultraWebGrid1_InitializeLayoutHandler(gridName){ alert('Hello');}