My asp.net application runs in mulitple user controls rendered under a parent web page. Each user control has web datagrid rendered inside it and the web datagrid uses client side events. Some of these client side events uses
$find("<%= Me.grdDataTable.ClientID%>") to fetch the WebDataGrid dom in the user control.
But I am seeing the infragistics client side events are using specific arguments as input to it as in eg:
Is there a way to pass Client Id to these event methods as an input argument?
If the above assumption is correct you could put all event handlers in this single file and subscribe each instance of the WebDataGrid to that event handlers. But you can't change the arguments of the event handlers. Events are emitted by the WebDataGrid control so the user could execute some custom action at a given point of the component's lifecycle. Event arguments are hardcoded in component's source code and usually contain the sender (in our case this is the WebDataGrid's instance emitting the event) and some extra argument useful in the current event scenario. If you attach a handler having different signature than the event it won't be executed or the event handler arguments won't be properly populated.
Having that said I don't think you could accomplish what you want by passing the ClientID to the event arguments.
I hope the tip I gave you will help you accomplish what you want to do.
Is it possible to get the ClientId from the sender attribute(WebDatGrid.ClientId)? (Since you mentioned that sender attribute contain the current instance of the WebDataGrid which emitted the event)
Yes, you can get the ClientID from the sender. If that's what you need you don't have to create the dictionary as I suggested in my previous post.
var clientId = sender.get_ClientID / var clientId = sender.ClientID
Is the sender argument undefined? Or sender.ClientID is undefined? Probably you need to cast the sender object to WebDataGrid first.