About Me

My photo
"O Allah, make my love for You the most beloved thing to me, and my fear for You the most fearful thing to me, and remove from me all worldly needs and wants by instilling a passion for meeting You, and when You have given the people of the world the pleasures of their world, make the coolness of my eyes (pleasure) in worshipping You." Ameen

Tuesday, July 3, 2007

Obtaining values from a hidden column in a grid view

Although in .NET 2003, accessing a hidden cell in a grid was pretty straight forward, with 2005, a bit of a work-around is required in order to achieve the same. Although ‘Visible=False’ would allow us to access a cell for a hidden column in 2003, in the case of 2005, we need to use the style ‘display:none;’ in order to achieve the same. A simple example is as given below.










Applying it to hide the column in the grid,