Home » Asp.netRSS

Call GridView events using javascript

I am calling button click event using javascript 


In the same way is it possible to call gridview rowcommand event using javascript.



1 Answer Found


Answer 1

Yes, just be aware the GridViews are a "NamingContainer" - which means they add stuff to the control ID to make them unique.  This page explains in more detail:  http://www.asp.net/master-pages/tutorials/control-id-naming-in-content-pages-cs

In short - yes you can use JavaScript to click  a button  that fires the appropriate rowcommand  on the server, just get the control ID right so you can use your current JavaScript.


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter