I have a gridview and when a user selects a row I want to change the view in my multiview and display several new gridviews. A user would be clicking on a computer, and then it will display the computer stats/atached devices/etc. The new gridviews are going to need a column from the row that was selected, how do I get that? Thanks.
Share
What language are you doing this on? I have done this in VB and C#.
out which row was clicked on by
using the arguments that it was sent
(e) : e.FocusedRowHandle and then
call a fetch on the second table.
Next create another actionlistener
on the dataset that fills the second
gridview.
(secondDataset_BeforeFetch). Within
this fetch you grab the column you
need from the selected row in the
first column
DataRow row = FirstGridView.GetFocusedDataRow();
row2.ItemArray[indexOfWantedColumn];
Finally within that actionlistener add the value you got in step 3 to the SqlCommand to send it with the fetch to fill the second gridview
cmd.Parameters.AddWithValue(“@parameterName”, “valueToAdd”);
Where valueToAdd is the value you got from the DataRow in the 3rd step.