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


Please Help Members By Posting Answers For Below Questions

What are server-side comments in ASP.NET?

548


Can we have multiple worker process in an ASP.NET application? If so then how it has been handled by application? And who handles it?

553


Describe a Windows Service and its lifecycle ?

626


What is the difference between rest and restful?

538


Which namespace is used by ado.net?

568






What are sessions used for?

559


What are the different types of validation controls in asp.net?

520


Explain about the .NET framework?

573


What is asp net theme?

525


Explain security types in asp.net?

543


What is the significance of attaching a profile while creating a user?

567


How do you declare static variable?

563


Why do we use web config?

521


Explain the difference between an exe and a dll?

529


Explain what does mvc represent in asp.net? : asp.net mvc

502