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 / guest
Here, bind primary key of database to datagrid column make
it visible false.
and travel loop as
foreach(DataGridItem dataItem in DataGrid1.Items)
{
priceText = (TextBox)dataItem.FindControl
("txtBookPrice");
bookIdText = (TextBox)dataItem.FindControl("txtBookId");
Updatecode_for_perticular_row ();
}
txtBookPrice= textbox from witch u would like to update
txtBookId= test i.e. unique id comming from database
With help of unique id in for loop find perticular text in
texbox and update.
This code you will write on update button click.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How can I have a particular web page in an asp.net application which displays its own error page?
Explain the difference between overriding and overloading?
How can we update records in gridview?Is there any appropriate code for it?
How information about the user's locale can be accessed?
What are the session management techniques asp net?
What is the purpose of session management?
What is voluum?
What is web configuration file and how to use in web application
What is the difference between application state and session state in asp net?
Explain global assembly cache.
Do you know using sql cache invalidation?
What is asp.net localization?
Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?
Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?
If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?