Hello! I am trying to call a javascript function that should receive the grid clientID by parameter in the initialize event of the grid. Here's my code:
<ClientEvents Initialize=<%#"setLongTimeout('" + dgvLocResults.ClientID + "');"%> />
but I am getting
Databinding expressions are only supported on objects that have a DataBinding event. Infragistics.Web.UI.GridControls.GridClientEvents does not have a DataBinding event.
setLongTimeout is my function and exists, and dgvLocResults is the grid's name and exists as well.
What am I missing?
Thanks!
Hi Nicole Guivisdalsky,
Thank you for posting in our forums!
The reason you are receiving that error is because you are trying to use inline binding (<%# ... %>), which isn't available for the ClientEvents tag.
Another issue here is that ClientEvents should be assigned to the name of a function, and not invoking a function. Please try the following code for declaring the Initialize ClientEvent:
<ClientEvents Initialize="dgvLocResults_Grid_Initialize" />
And use this javascript code for the Initialize event's handler.
function dgvLocResults_Grid_Initialize(sender, eventArgs) { // sender.get_id() will return the grid's ClientID. setLongTimeout(sender.get_id()); }
If you need further assistance with this, please let me know and I will be glad to help.
Hello Nicole Guivisdalsky,
Please let me know if you have any other questions or concerns about this issue and I'll be glad to help you.