Click here to Skip to main content
16,022,846 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello there
I binging data to gridview using datatable.GridView is inside UpdatePanel
I am using <asp:buttonfield> inside GridView.
When clicked on button, values of DataTable are assigned to text boxes which are out side the GridView & Update Panel both.

But problem is that values are not comming in the text boxes. These text boxes are in another update panel.

Please tell me solution.
Tthanks in advance.
Posted
Updated 15-Feb-10 2:25am
v3

A particular Update panels refeshes the UI partially i.e. the part that is inside that update panel.

Update panels can have has something called 'Triggers' associated with them.

From what you need:
if you need to update the textbox values in UI then the update panel having those textbox values need to be triggered for an update.

You can use those button fields added as triggers to the second Update panel. Then, whenever those button fields are used, it will trigger the other update panel and thus update the textbox values.
 
Share this answer
 
A page can host several UpdatePanels. By default, when one UpdatePanel on a page updates, the other UpdatePanels on the page also update. Sometimes that’s what you want, but more often than not, you don’t need every UpdatePanel updating in response to other UpdatePanels.

You can be selective about which UpdatePanel instances update (and when) by setting the UpdateMode property of each UpdatePanel control on the page to "Conditional." Then, when one UpdatePanel updates and calls a server-side event handler, call UpdatePanel.Update on the other panels you want to update. This reduces the load on the server by reducing the number of controls that render, and it reduces the volume of data in the response because UpdatePanels that don’t update don’t add anything to the response.
 
Share this answer
 
I had a similar problem.
Putting textboxes inside the UpdatePanel will work for you.
But I am not sure if its a correct solution. It's just a work around that worked for me.

I am looking forward to hear from other people for a better solution.. :)
 
Share this answer
 
You said that "but problem is that values are comming in the text boxes"

So What is your problem exactly? you don't want values in textboxes?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900