Click to See Complete Forum and Search --> : GridView - dynamically set column to visible, and how to set a single row to bold?


cube01
June 22nd, 2008, 02:58 PM
I'm working with a gridview and need to programatically set the Visible property of a single column to true or false depending on user settings. Is there something like gridView.Column1.Visible = true;? I can't find anything like that if there is.

Also, Is it possible to set the text of a single row to bold? I can do it for single columns but can't figure out how to do it for single rows. Basically I just need to make the first row of the grid bold.

Thanks for any input or nudges in the right direction.

cube01
December 5th, 2008, 10:28 PM
I figured this out some time ago and forgot to update my posting

I knew it was something easy I just didn't know how to access the properties. Anyways here it is:

-Set individual Row visible property:

gridView.Rows[0].Visible = false;

-Set individual row to bold property:

gridView.Rows[2].Font.Bold = true;