When I click on an item I would like to fill my TextBox with numbers from a column from Grid2 after Grid1 is clicked. Right now if I click on an item in Grid1 it will then run a procedure that will fill Grid2 with data. Here is an example of the current functionality with picture attached. I click an item from Grid1 and it has 3 results, my textbox will still display as an empty textbox. Then I click another item in Grid1 and now my textbox will display the 3 results from the previously clicked item. How can I display the correct numbers in my textbox after an item is selected in Grid1.
Here are some snippets of what I currently have:
or I can comment out the above and use this to achieve the same results which are not correct:
Here are some snippets of what I currently have:
protected void Grid_Product_List_Details_PreRender(object sender, EventArgs e) { RadGrid grid = (RadGrid)sender; if (grid.Items.Count > 0) { RadTextBox1.Text = ""; } for (int i = 0; i < grid.Items.Count; i++) { RadTextBox1.Text += grid.Items[i].GetDataKeyValue("number").ToString() + "\n"; } RadTextBox1.DataBind(); }or I can comment out the above and use this to achieve the same results which are not correct:
protected void Grid_Product_List_Header_SelectedIndexChanged(object sender, EventArgs e) { RadTextBox1.Text = ""; for (int i = 0; i < Grid_Product_List_Details.Items.Count; i++) { RadTextBox1.Text += Grid_Product_List_Details.Items[i].GetDataKeyValue("number").ToString() + "\n"; } }