.NET Framework Bookmark and Share   
 index > JScript for the .NET Framework > GridView - OnClientClick
 

GridView - OnClientClick

How can I activate a script when the User click on a cell in a GridView. The same way as a script can beactivated when the User click a command button (OnClientClick). In short, can I activate a script thru code in a GridView.RowCommand event?

Thanks,
Lennart Hoglund
Lennart Höglund

I haven't made anything in ASP .NET but I think this solution could work.
There is an uncomfortable way to fire events in JScript .NET. You must write your own class extending GridView and override the On....() method:

class MyGridView extends GridView {

    protected override function OnRowCommand(e : GridViewCommandEventArgs) {

        // your code for execution

    }

}

then create a GridView using this class.

Marek Pepke, Poland

You can use google to search for other answers

Custom Search

More Threads

• <img> reloading the src
• Access Denied Javascript Error
• access class library from jscript
• Jscript and Infopath to force numbers
• Cannot load script.js in infopath 2003SP1 MSE
• 2 submit buttons
• reading file attributes through javascript.....
• Conformation box for a link button
• Sudden JavaScript errors on ASP.NET page
• WScript files editor with IntelliSense