You know the grid id. It lets you find the table the grid is rendered as.
The first row of the table contains the column headers. If you know the
column header text, you can loop through the cells of the first row and find
the one with the innerText matching the required header text. In this way
you find out the index of the required column in the row. Then loop through
the rest of the rows and set display:none for the cell with the required
index.
Eliyahu
"Rob" <Ro*******@Yahoo.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Does anyone know how I could hide a column in a DataGrid? To make the
problem harder I am using AutoGenerateColumns="True" so I don't know
how to find the control using document.getElementById(ControlID) and
then hiding it by using display:none;
Anyone have any suggestions?
Thanks for the help.