We just updated our system to use Visual Studio 2008 and Infragistic NetAdvantage 8.2. Clientsideevents that use to work are now causing us problems. We have some cases where we are using clientsideevents on grids and passing parameters to the JS function. We are getting errors that it can’t find the method. It appears the events only want you to pass the name of the method, not any parameters.
When this line is changed to the following it will not get the error but it does not do what was requested. Is there a work around for this?
ugrdCreditScores.DisplayLayout.ClientSideEvents.AfterRowCollapsedHandler = "infragGridAfterRowCollapsed"
Hello,
The syntax for client-side events in recent version of UltraWebGrid is fixed - the name of the event handler and fixed parameters that are documented in the Client Side Event CSOM here
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Client_Side_Events_CSOM.html
for example, the syntax for AfterRowCollapsed is:
AfterRowCollapsedFired after a row is collapsed on the clientParametersgridNameString. The name of the Grid which is firing this event.rowIdString. The id of the row which was activated.
which translates in the following event handler:
function infragGridAfterRowCollapsed(gridID, rowID)
{
...
}
unfortunately you cannot pass additional parameters directly from the server anymore, but you can use client-side code for that. For example:
function infragGridAfterRowCollapsed(gridID, rowID){ ... var gridID = "<%= ugrdCreditScores.ClientID %>"; var chckExpandAllID = "<%= chkExpandAll.ClientID %>"; ...}
Thanks for the reply but your example does not solve our problem. In the old version we use "common" code that all the grids call. This code will now have to be repeated in every class.