views:

30

answers:

1

I have a gridview which is in a usercontrol on a page. The gridview displays data based on whatever the calling page tells it to, which may or may not include certain columns.

I want to tell the gridview how to format the columns if they're present on the page, but I also need it to ignore all the formatting if the column doesn't exist.. I already know how to format them, so I guess I just need a method to determine if they're there, and where they are in the gridview.

Thanks

+1  A: 

It sounds like you need to be creating everything dynamically in your code-behind to achieve this kind of granularity. This should help:

http://bit.ly/3iP0Fq

IrishChieftain