L
lilfos
I've tried my darnedest to add a function call to the onclick event of
a datagrid's numeric page buttons, but to no avail. I have added to
the onclick event of other controls by adding an attribute in the code
behind during initialization and by using javascript to loop through
each control in a form and add to the onclick event of the controls
whose name match certain criteria (this is useful when you have
controls generated for each row of a datagrid).
Unfortunately, the page links are not controls. They are anchor tags
that call _doPostBack. I tried looping through each link in
document.links, but this only returned the text of each link (e.g. the
page number). I couldn't get this into the form of an link object so
that I could set and get its properties.
DataGrid1.PagerStyle has an AddAttributesToRender method, but it does
not seem to work and it is not documented.
Does anyone know if/how I can add to the page links' href or onclick
attributes? I need some client-side script to execute before unload, so
handling the event in the code behind won't work for me.
Thanks!
a datagrid's numeric page buttons, but to no avail. I have added to
the onclick event of other controls by adding an attribute in the code
behind during initialization and by using javascript to loop through
each control in a form and add to the onclick event of the controls
whose name match certain criteria (this is useful when you have
controls generated for each row of a datagrid).
Unfortunately, the page links are not controls. They are anchor tags
that call _doPostBack. I tried looping through each link in
document.links, but this only returned the text of each link (e.g. the
page number). I couldn't get this into the form of an link object so
that I could set and get its properties.
DataGrid1.PagerStyle has an AddAttributesToRender method, but it does
not seem to work and it is not documented.
Does anyone know if/how I can add to the page links' href or onclick
attributes? I need some client-side script to execute before unload, so
handling the event in the code behind won't work for me.
Thanks!