Tutorial :Add new row to gridview


I'm using a gridview to display and access a sql database and using databinding. I'm also using autogenerate columns as one gridview has multiple sources and toggles between them. What would be the best way to allow the user to insert a new row?

Would a listview be better?


What about changing the DataGridView.EditMode property to something other than EditProgramatically?


  • FormView on the page, DefaultMode = Insert, and provide an Insert Template.
  • Add buttons / visibility toggles / datahookup etc. as needed.


Easiest way to to add a detailsview, set it to the datasource of the gridview and done.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »