GridView within an UpdatePanel - Get Updated Textbox values on button click?

As per my understanding, you should use a trigger for the update panel which is something like below.

Up vote 2 down vote favorite share g+ share fb share tw.

IGNORE THIS: I was rebinding the grid in the Onload method. I have a grid view with some textboxes, which I have to wrap in a UpdatePanel Control. So it looks like this: No pricing history data found.

There is a button "Save" when I would like to get the value entered for the txtboxes. If there is no UpdatePanel around the GV, I can can easily get the txtbox values like: ((TextBox)gvDistributions. Rows0.

Cells0. FindControl("txtPriceA")). Text But when, the GridView is wrapped with UpdatePanel, the above statement returns the value that was set on the page load.

How can I get the value of the text box without getting rid of the updatePanel. I need the update panel, because the number of rows, and dates are dependent on another variable in another user control. C# asp.net gridview updatepanel link|improve this question edited Oct 6 '11 at 21:10 asked Oct 6 '11 at 19:51Bitmask1147 80% accept rate.

– James Johnson Oct 6 '11 at 20:23 @JamesJohnson No I cant. – Bitmask Oct 6 '11 at 20:33 Hmm... my thinking might be backwards here, but try adding ScriptManager.GetCurrent(). RegisterPostBackControl(txtDistPrice); in the code-behind?

– James Johnson Oct 6 '11 at 20:39 What are we supposed to ignore here? Did you find the answer to your question? If so, please post it as an answer and mark it as accepted.

– jwiscarson Oct 6 '11 at 14:51.

As per my understanding, you should use a trigger for the update panel which is something like below. ... Hope this helps!

How can I set the trigger from a UserControl's Textbox entry. The Usercontrol A is on the same page as this UserControl B which holds the UpdatePanel If I am being confusing - UserControl B = usercontrol that contains the update panel UserContorl A = user control that I want the update panel to listen to – Bitmask Oct 6 '11 at 20:33.

Use your TextBoxes with their AutoPostBack property set True.

I was rebinding gridview in the onLoadMethod.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions