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

how to align detailTemplate button on the far right

1 Answer 463 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kalli Kaldi
Top achievements
Rank 1
Kalli Kaldi asked on 10 May 2016, 10:25 AM

hello

I´m wondering how I make the detail template button appear on the far right in each row instead of it displaying on the left

best regards from Iceland

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 May 2016, 07:55 AM
Hello Kalli,

The task can be divided into two parts:

1) use a custom expand/collapse button(s) in a column template on the right side of the Grid. The button(s) should rely on the Grid public API for expanding and collapsing master rows. You can use built-in Kendo UI icons if you like.

column template
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.template
 
expandRow
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-expandRow
 
collapseRow
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-collapseRow

icons
http://demos.telerik.com/kendo-ui/styling/icons

2) hide the native expand/collapse buttons by shrinking the expand/collapse column to zero width.

 
.k-grid .k-hierarchy-col,
.k-grid .k-hierarchy-cell {
  width: 0;
  overflow: hidden;
}


Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Kalli Kaldi
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or