Net gridview rowupdating event

31 Aug

Free counters Added on January 19,2012 Follow Me @vmsdurano A bit About Me Disclaimer The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers.

Nor does it represent the opinion of my dog, because I don’t have one.

To manually specify columns for the gridview you have to set Auto Generate Columns="false".

So when we use these special key words as the Command Name for the buttons in the Grid View, they automatically invoke the built in functionality of the Grid View when we click on the button.

The HTML code for the Grid View is as follow : Till now everything looks fine but the problem arises when you run this application.

When you click on edit button of the Grid View a Javascript error occurs : “Microsoft JScript runtime error: Sys. Page Request Manager Server Error Exception: The Grid View ‘gd Test’ fired event Row Editing which wasn’t handled.” At first look you may think that you have not handled some events fired by the Grid View. The mystery behind this error is the property “Command Name”.

Now we access this connection string on the page so we can open a connection with the relation database. The first one accesses the connection string and the other is for the SQL connection.

Now we define a method for opening a connection with the relation database and returns a SQL connection object depending on the connection string that is passed as a parameter of the Sql Connection class constructor.