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

Keep specific(two ) columns together when reordering columns

3 Answers 13 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kz
Top achievements
Rank 1
Kz asked on 13 Mar 2017, 12:30 AM

Hi There,

We need to keep two columns together always when we are reordering columns. Lets say we have 5 Columns  A B1 B2 C D. We want to keep columns B1B2

together always when we are reordering i.e B1B2 columns should allow to drag and drop reordering.

 Possible reordering cases B1B2 ABC ,BB1B2CA...........

Can we achieve this with Silverlight RadGridview.? 

3 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 15 Mar 2017, 11:42 AM
Hi,

You can try using one column to represent both values and set a custom CellTemplate as well as modify the column header to show multiple values.

Regards,
Stefan Nenchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Kz
Top achievements
Rank 1
answered on 15 Mar 2017, 03:41 PM
If we use Cell Template we will lose the features for filtering, sorting. So CellTemplate is not a workaround solution i guess.
0
Stefan Nenchev
Telerik team
answered on 17 Mar 2017, 01:37 PM
Hi,

Indeed, you will lose some important functionalities if you take this approach. However, there is not a straightforward way to achieve the behavior you seek for. Another possibility would be to utilize the ColumnReodered/ColumnReordering events and manually check the columns that are being reordered to make sure the columns are always stuck together. You can work with the DisplayIndex properties of the columns.

Regards,
Stefan Nenchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Kz
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Kz
Top achievements
Rank 1
Share this question
or