datagrid within SelectedItemTemplate of another grid

  • Thread starter Randy Vande Hei
  • Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top