I have a whdg that is one band deep (a rootband with one childband). In this childband I inserted a column with linkbuttons. When the user clicks the button I want to redirect him to a page to edit the record that contains the linkbutton.
I know how to capture the click event of the linkbutton, but I don't know how to determine which row the button belonged to when it was clicked. What is the best way to figure this out?
Hi,
It depends on what type of info you have in the rows. You can get the row.index but that might not be too useful because it will be an index based on that child band. If you have some sort of datakey in the row then sending that key through the commandargument would be your best bet.
Ed
I don't know how to get the row.index though. When the event is triggered I get a count of 0 rows that are selected (WebHierarchicalDataGrid1.Behaviors.Selection.SelectedRows.Count = 0). This probably has to do with the fact that the LinkButton is clicked and no selection has been performed yet.
I can get a datakey in the row, since I have complete control over the data that is being used. I have no idea how I can send the key through the commandargument. Could you perhaps provide an example of how that is done?