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

Locked column with client template

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 30 Apr 2015, 06:42 PM

Hello,

I'm creating a grid using Razor syntax and would like to lock the left column

    @(Html.Kendo().Grid(Model.GridData)
    .Name(GridID)
    .Columns(columns =>
    {
            columns.Template(o => o).ClientTemplate("<a class='k-button k-grid-details'>...</a>").Width(15).Locked(true);

 

When I run the grid with .Locked(true) as part of that column definition, the grid doesn't load. I only see the loading icon and the website hangs.

Please let me know what's wrong with my syntax. I've seen threads saying that the grid doesn't allow locked columns with templates, but the example was a hierarchical grid. My grid is not a hierarchy.

 

I'm trying to ensure that the left most column stays a constant width. It doesn't need to be locked necessarily, I just don't want it to get narrower if the window size changes. The grid must be 'Scrollable' so that the headers are always visible at the top.

 

Thanks in advance, and let me know if I can provide any more information.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 04 May 2015, 11:31 AM

Hello Eric,

Using locked columns with client templates is a supported scenario, so it should work. I have created a demo that shows it working, please edit it in order to reproduce the issue and we will be happy to take a look:

http://dojo.telerik.com/elIpa

Regards,
Kiril Nikolov
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
Eric
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or