R
Randy Vande Hei
I have a datagrid (grdOrderLines) within the SelectedItemTemplate section of
another grid (grdOrders).
I dynamically set the datasource of grdOrderLines based on the key
information with the grdOrders. That all works fine.
The problem that I have, is that I want to either remove a column or make a
column invisible within the subgrid - "grdOrderLines". But I can't seem to
get a reference to the grid in any events. I've tried the grdOrders
itemDataBound, ItemCreated, and ItemCommand of the grdOrders grid. I've
tried using the e.Item.FindControl and page.FindControl, but they all
return a null. I've also tried using the module level variable, which I
didn't think would work, since there could be many grids on the page.
The code will be easy once I get a reference to the grid. i.e.
grdOrderLines.Columns[1].Visible = false.
-Randy
another grid (grdOrders).
I dynamically set the datasource of grdOrderLines based on the key
information with the grdOrders. That all works fine.
The problem that I have, is that I want to either remove a column or make a
column invisible within the subgrid - "grdOrderLines". But I can't seem to
get a reference to the grid in any events. I've tried the grdOrders
itemDataBound, ItemCreated, and ItemCommand of the grdOrders grid. I've
tried using the e.Item.FindControl and page.FindControl, but they all
return a null. I've also tried using the module level variable, which I
didn't think would work, since there could be many grids on the page.
The code will be easy once I get a reference to the grid. i.e.
grdOrderLines.Columns[1].Visible = false.
-Randy