Editable gridview by default

Hi All,

I have a  data Table which has data assigned to it from two queries, the first one build the column headers and then the second one assigns row to this dataset
example :
UC1       UC2             UC3            UC4            UCn
200701 200801     200901         201001        201102
Y           Y                Y                 N                  Y
Contract Contract   Contract    Contract          Contract

Once this is build , I assign it to a gridview  Can I keep all the rows editable by default instead of making the user click on edit button to get to edit mode.  In this case the columns are build dynamically, there can be n cols.   The users should be able to edit any cell and then on a submit button every thing get saved to a table.

Please let me know how to achive this.

Who is Participating?
masterpassConnect With a Mentor Commented:
All you have to do is, directly assign the row index to property EditIndex:

GridView1.EditIndex = 0;// instead of the zero pass the row indexes of the gridview
sanjaypandeyAuthor Commented:
that does it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.