I'm not sure if I get the whole thing.

With the GridView you can edit columns as you want by
enabling/disabling columns.
What do you bind to the GridView? If you bind a method for updating a single
record of the database or your Business Layer the record is updated in your
database after editing the column.

If you want the following:
- display the gridview
- edit single columns and dont update them directly in the database
- after clicking "btnSaveAll" all updates are saved in the database
I would do the following:
- dont bind a update method to gridview
- create an event for the gridview with "RowUpdated" and put the record with
all new data into a list (lstRecordsToUpdate)
- after clicking "btnSaveAll" you just have to go through
the lstRecordsToUpdate and update the single entry in the database.

I hope that helped.
Steffen


On Wed, Aug 12, 2009 at 12:17 PM, Meghan Kharva <[email protected]>wrote:

> i m using my own update function..
> let me clear in detail...
> i have a grid view.. i want to edit 2 columns on one button's click event
> (say btnEditAll)..
> after that when i finish editing all fields it should update all edited
> fields in database on other button's click event (say btnSaveAll)...
>
> On Tue, Aug 11, 2009 at 4:35 PM, Steffen Sommer <[email protected]
> > wrote:
>
>> Hi Meghan,
>>
>> the second problem you told, is easy to solve, every column has a
>> readonly property, set this to false and you cannot edit these bound items.
>>
>> With your fist problem i have a little understanding problem. Do you use
>> the build-in update function or do you use an self-made one?
>>
>> On Tue, Aug 11, 2009 at 9:32 AM, Meghan Kharva <[email protected]>wrote:
>>
>>> HI all,
>>> i m new to this group...So let me introduce myself...
>>> my name is Meghan, i am from Gujarat..
>>> My problem is that i want to edit 2 columns in gridview...
>>> i m using VS2008 Express edition.. trying to make a page in asp.net
>>> on button's click event grid view is loaded and bound with database it
>>> has about 10 columns. I want to edit 2 columns and want to save it when i
>>> click save button. and one more thing when i click edit button those 2
>>> columns should be editable and after editting first cell when i press enter
>>> the cursor should move on next cell... please help me on this..
>>> (Sorry for my english.)
>>>
>>
>>
>

Reply via email to