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

Order of Columns

2 Answers 61 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 05 Apr 2012, 06:32 AM
If I have a object with properties bound to a grid: A, B, C, D (Object Order), but columns as displayed (D, C, B, A) by changing the columns value on the gird when an item is added it seems to be added in the grid column order, not the object order, so I get a very interesting collection:

A, B, C, D
A, B, C, D
D, C, B, A

Where the first two are items retrieved from a database and the last one is added via the add button on the grid.

Needless to say when I send the data to the web service, it really doesn't like it.

I don't know if this is a Javascript problem, a WCF problem, a Kendo MVVM problem or a Kendo Grid problem. If I rearrange the object on the WCF side to list in the order I want to display things. All seems fine.

What is the best way to handle this?

Thanks
Randy

2 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 05 Apr 2012, 08:51 AM
Hi Randy,

I am not quite sure if I understand your scenario correctly. Could you please share a code-snippet or a simple runnable project so I can get a better view over your case? 

Regards,

Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Randy
Top achievements
Rank 1
answered on 05 Apr 2012, 05:18 PM

It is working now.

There had to be some other error involved. I don't quite understand it, but I had made several changes to data-source and data-columns. I am assuming the error was something I corrected/changed in that.

I did make a sample WCF app which I have included in case it helps anybody else. I know that I had difficulty without such a sample.

Randy

Tags
MVVM
Asked by
Randy
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Randy
Top achievements
Rank 1
Share this question
or