1

in my webpage i'm using aspxgridview that contains 3 columns with type "text column" and i don't want that gridview to show any retrived data from database so i'm not using datasource the mission of this gridview is to accept input by user and insert the information entered by user to a table in database i have set the properties: enableediting and enableinserting to true the problem is when i run the project and press the hyperlink "new" in the gridview to insert a row in it i can't write any text in the text column and when i press "update" a message appeared that said: "Specified method is not supported." please note that the property "ReadOnly" in each text column is set to false i couldn't find example about the use of aspxgridview for insert purpose only without bind it to any datasource thank u

AlfeG
  • 1,475
  • 4
  • 18
  • 33
Hong Gk
  • 11
  • 2

1 Answers1

1

Why do You need GridView for such functionality? Why not to use simple asp:TextBox with asp:Button for this?

Respond to update:

You can create List of data bound to this page. Bind this list to GridView as datasource. Render GridView rows in edit mode and fill data to this list. But You will need to handle all gridview events connected to item editing/inserting.

List of Data You can store in ViewState.

Nowadays I would rather go with js implementation of such functionality. As examples I can provide You with this links: http://jsfiddle.net/rniemeyer/7RDc3/

AlfeG
  • 1,475
  • 4
  • 18
  • 33