I am working with a detailtable in radgrid and need to do a couple things that I have done on the radgrid, but it is not working in the detail table.
1) I am using client onrowclick to open window, which works fine in master table, but not in detail table. I need to somehow get the innerHTML of the cell of the clicked detailtable row.
2) I have some checkboxes that are used to control the columns displayed. It happens on server side, after binding the grid. The function works, but the detail table only removes the column on second databind. So basically I run report showing all columns, works fine. Then I uncheck a check box and run report, master column is removed, but detail column remains. Finally leaving checkboxes alone I run report again and both master and detail column is removed, which is what I want. Why is it not happening on first bind?
Any help is appreciated.
1) I am using client onrowclick to open window, which works fine in master table, but not in detail table. I need to somehow get the innerHTML of the cell of the clicked detailtable row.
| function RowClick(sender, eventArgs) |
| { |
| var MasterTableView = eventArgs.get_tableView(); |
| var cell = MasterTableView.getCellByColumnUniqueName(MasterTableView.get_dataItems()[eventArgs.get_itemIndexHierarchical()], "ID"); |
| window.open("../ClientInformation.aspx?ClienteID=" + cell.innerHTML); |
| } |
2) I have some checkboxes that are used to control the columns displayed. It happens on server side, after binding the grid. The function works, but the detail table only removes the column on second databind. So basically I run report showing all columns, works fine. Then I uncheck a check box and run report, master column is removed, but detail column remains. Finally leaving checkboxes alone I run report again and both master and detail column is removed, which is what I want. Why is it not happening on first bind?
| private void CustomizeGrid() |
| { |
| foreach (ListItem li in chkDisplayColumns.Items) |
| { |
| if (!li.Selected) |
| { |
| gridResults.Columns.FindByUniqueName(li.Value).Visible = false; |
| gridResults.MasterTableView.DetailTables[0].Columns.FindByDataField(li.Value).Visible = false; |
| } |
| else |
| { |
| gridResults.Columns.FindByUniqueName(li.Value).Visible = true; |
| gridResults.MasterTableView.DetailTables[0].Columns.FindByDataField(li.Value).Visible = true; |
| } |
| } |
| } |
Any help is appreciated.