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 to rename a table using sql queries?

1102


What is the use of session in web application?

952


What is the biggest disadvantage of “Other Return Types” in Web API?

1414


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

1016


Difference between .NET and previous version?

2586


Why we use content place holder in asp.net?

1036


What is the difference between table and query?

969


What is considered a service provider?

955


What's the use of response.output.write()?

1274


Is LINQ performance wise better or using sqlcommand?

5098


What are validators and list some validators of asp.net?

970


Web API uses which library for JSON serialization?

1071


How Session use Cookies in State Management?

1069


What is sta?

980


How can you identify that the page is post back?

989