Bug Vanquisher

31 May 2007

Nice little tip

Filed under: Tips — Tanveer Badar @ 5:10 PM

We needed to pass some extra information on one web page.

That information was part of a column in a GridView and should have been available to client side script but not rendered. We could not set the Visible property of that column to false. That would not have solved the problem because anything that is not visible isn’t even rendered by ASP.Net to the client.

We thought and we thought like we do in situations like this. Eventually, one trick came to my mind, just like the illumination that ’64 S on a C B’ means 64 squares on a chess board. I told the developer to use a template column, add a HiddenField as ItemTemplate and EditItemTemplate for that column, set the Value property to the information we needed to pass and voila! Problem was solved with only a three pixel wide column displayed. To make that even less noticable, we set the boder style for that column to Transparent, BorderWidth to 0px and even those little horizontal lines were gone.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: