Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can I have a particular web page in an asp.net application which displays its own error page?

1052


Explain the difference between overriding and overloading?

948


How can we update records in gridview?Is there any appropriate code for it?

2092


How information about the user's locale can be accessed?

991


What are the session management techniques asp net?

949


What is the purpose of session management?

932


What is voluum?

920


What is web configuration file and how to use in web application

970


What is the difference between application state and session state in asp net?

988


Explain global assembly cache.

979


Do you know using sql cache invalidation?

965


What is asp.net localization?

938


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?

914


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?

933


If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?

2418