views:

69

answers:

2

I have a two text boxes named region id and region name..and a button control

I enter some values into those text boxes and click the button to insert those values into the "gridview"and a "data table" associated with the gridview.

The gridview has the "enable editing" set to true..but when i click the "edit" button of a particular row in a gridview i get no response...i.e i do not get editable textboxes as it happens normally...

What is the solution for this?

+1  A: 

GridView Examples for ASP.NET 2.0: Editing the Underlying Data in a GridView

Editable GridView in ASP.NET 2.0

Aseem Gautam
As i have mentioned in the question i have "enabled editing" and i am starting with an empty datagrid..the moment i enter some values in the two textboxes and click on the button one row gets added to the gridview and so on..and the gridview is bound to a datatable, not a "sql" or an "object data source"
chaitanya
+2  A: 

You need to set the EditIndex of the row you are editting on the gdvMyGridView_RowEditing event:

gdvMyGridView.EditIndex = e.NewEditIndex

This will display your EditItemTemplate for the relevant row.

bulltorious