Suppose you display a data having 200 records in a
datagrid. Then you edit 100 records of them. Now when you
will press update button,all 100 records should be updated
in single shot rather than reading every record and
updating. How to do it?
Answer Posted / pradeep
Each row is having Edit/Update/Cancel button.
In "_UpdateCommand" event, we can write a code to update
directly into the database. But it is not good practice.
For updating whole records in a single event, we need to
have hidden column for updateflag and while updating we can
store the updated data into session. By using BUTTON
control out side of datagrid, we can find only 100 records
(updated records) based on updateflag and we can update
only those records into DB.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How can we access static variable?
Define application state variable and session state variable?
Where is the view state data stored in asp net?
Explain repository pattern in asp.net mvc? : asp.net mvc
How can we create custom controls in asp net?
What do you mean by View State and what is its role?
Differentiate between a hyperlink control and a linkbutton control.
How ViewstateMac works?
Explain the main differences between asp and asp.net?
How will you load dynamic assembly?
Explain the code Access Security (CAS) in .net Framework?
Why do we need master page in asp.net?
What is the advantage of using Windows authentication in a Web application?
What is the difference between ASP Session State and ASP.Net Session State?
Define a multilingual website?