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 the differences between clr & cts?

543


What is the displayafter property in updateprogress control?

511


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

505


What is the difference between client-side and server-side validations in ASP.NET?

669


How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.

625






Explain one critical mapping?

568


What are the parts of an http response?

504


What do you mean by authentication?

529


What is the appSettings Section in the web.config file?

588


How do you declare static variable? What is its lifetime?

514


witch is the best insistute in sharpoint course.what abt future of share point course.

2556


What is the difference between union and join?

565


Are cookies client side or server side?

500


How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?

3417


What is asynchronous call?

590