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

Grid re-ordering and sorting now working with row template (AngularJs)

2 Answers 295 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yinka
Top achievements
Rank 1
Yinka asked on 22 Sep 2016, 01:04 PM

Demo available here dojo http://dojo.telerik.com/@yerinle/iHEHe 

When I re-order a column (e.g moving "Contact title" to be the first column), then if I click on "Contact title" to sort, "Contact Name" data now appears under "Contact title". So the grid content goes back to the initial state with the re-ordered columns out of sync.

Seems to be a side effect of using row template, which I need to use.

So is it possible to get this working properly with row template.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 26 Sep 2016, 10:29 AM
Hello Yinka,

This occurs because the Grid is changing the column order, but cannot modify the custom defined row HTML.

When using rowTemplate, you have to handle the template HTML changes manually. To achieve this, use JavaScript inside the template definition.

More information can be found in a similar thread in our forum:

http://www.telerik.com/forums/column-reordering-row-templates-for-grids

Also, I modified the provided example to work as expected:

http://dojo.telerik.com/iwAra

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Yinka
Top achievements
Rank 1
answered on 27 Sep 2016, 09:04 AM
Thank you Stefan that's what I was looking for.
Tags
Grid
Asked by
Yinka
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Yinka
Top achievements
Rank 1
Share this question
or