This is a migrated thread and some comments may be shown as answers.

[Solved] Column Display selection and editing

1 Answer 86 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nic
Top achievements
Rank 1
Nic asked on 10 Sep 2009, 03:01 PM
Hi,

I have a user interface where the user is presented a RadGridView. Lets say by default, we'd like all columns (A - J) to display. The user is then able to select a button to bring up a dialog to modify the column selection.

The dialog has two list boxes, available columns and selected columns, allowing the user to move columns between the two. In the above case, Columns A-J appear in the selected columns list box. Moving Column A to the available column list box means the user does not want column A to display.

As well, in the selected columns list box, the user is able to re-order the list to affect the order of the columns displayed in the grid.

When the dialog is dismissed, the RadGridView should now reflect the selected columns in the new sequence they were put in.

I'd appreciate how to do something like this.

thanks.


1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 14 Sep 2009, 09:09 AM
Hi Nic,

RadGridView exposes its column collection through the Columns property. You can add and remove columns at run-time through this collection. You can also use the IsVisible property of each column to show or hide it. Each column has a Header property which you can use as the label in your custom made ListBox.
Using the public API of RadGridView gives you the opportunity to create any logic that you want.

I hope this helps.

Regards,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Nic
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or