Hi guys

I use a GridView (using template fields) with several columns and a image button in the last column.

I want the button to mimic an edit button, but:

I want it to open a row which has no columns and just has some fields (TextBoxes , DDL's etc) and a "close" button which will close this customized "edit" row. so it's like an edit row with no columns and with customized fields.

I believe there is a simple way to do so, can you please give me an idea?
(I don't want to use a popup of ajax' I want the row to be in the grid itself)

Thank you very much

Recommended Answers

All 2 Replies

If you add a gridview control to your page and attach a datasource that has the select, and at least the update statements included, you will be able to enable editing for the gridview. Once you do that, you will see an edit button next to each row in the gridview.

When you click on the edit button, you will then be presented in the first column an update and cancel button.

This will allow up to change the data in the controls located in the various fields and when you click on update, the sql update statement will modify the existing row in the data source.

Here is a point of reference, but if you do a search online for "how to enable editing in asp.net gridview", you'll see quite a bit of examples, tutorials, etc...


Thank you JorgeM
I know how to edit a row in a gridView, but here I want that the edit line would be without the original columns, and that's what I can't seem to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.