For the first time I am creating a Gridview dynamically. I have to do this because I don't know how many columns are required - the Gridview shows users in a group as columns - and each group has a different number of users on it.

So far it seems to be a nightmare. Because everything is created at runtime on postback everthing is lost and it's virtually start again time. I've had to sent the ViewState on the GridView to false otherwise, every postback, it adds the columns again.

Any tips or pointers on this sort of thing? Seems to be a dozen ways of doing everything and they all have their ups and downs.

Thanks for any tips.