It is possible.

GridView1.Columns[i].Visible = false;

where i = the column number that you wish to hide.

On Jul 30, 7:50 am, stapes <[email protected]> wrote:
> Hi
>
> I am trying to optionally hide a column in a gridview, depending on
> settings in the web.config.
>
> In the web.config I have this:
>
> <add key="HideKeys" value="True" />
>
> Then in other pages:
>
> string sHideKeys = ConfigurationSettings.AppSettings["HideKeys"];
>         if (sHideKeys == "True")
>         {
>
> This is where I want to hide the relevant columns. Is this possible,
> and if so, how?
>
> Stapes

Reply via email to