Reputation: 751
I have a gridview and within it there is also another gridview as a templete filed, inside the nest gridview there is a textbox as a templete filed, now there is another button on nested grid too, when ever i press the button and i try to get the textbox value it's always empty, am i doing anything wrong ?
Upvotes: 0
Views: 297
Reputation: 4469
You can try as below code format in Page_Load
event:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
gridView.DataSource = yourDataSource;
gridView.DataBind();
}
}
Upvotes: 1