tags:

views:

411

answers:

1

I want to give users the ability to customize the columns of an asp.net ListView.

For example: there are 10 columns of data, a user should be able to select any number of columns to be displayed on their personalized view of a ListView.

I have investigated how to accomplish this task and what I have come up with is; implementing the ITemplate interface at run time based on a particular users setting.

The following msdn article describes how to implement the ITemplate interface. http://msdn.microsoft.com/en-us/library/aa289501%28VS.71%29.aspx

Is there a different (better?) way to accomplish my goal that I should be aware of?

A: 

I have implemented this kind of feature before. However, I did not use the ITemplate interface. I used the very traditional approach of having horizontal checkboxes corressponding each column. Based on the checkbox(es) checked or unchecked, I set the visiblity of the column(s) on the ListView.

Shiva