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
Define authentication and authorization.
What is session in web technology?
Describe how passport authentication works.
How does viewstate work?
if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....
How would you turn off cookies on one page of your website?
Explain the path instructions in xaml?
Which protocol is used to call a web service?
Explain the difference between asp & asp.net.
Explain in what order a destructors is called.
Is asp.net mvc front end or backend? : Asp.Net MVC
What is __ requestverificationtoken?
Can you explain why it is useful to use mvc instead of webforms? : asp.net mvc
What is the difference between the get method () and post method ()?
Can any body provide me the sample web application in asp.net