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

[Solved] Editable Row Template with Paging options

1 Answer 212 Views
Grid
This is a migrated thread and some comments may be shown as answers.
prakash
Top achievements
Rank 1
prakash asked on 05 Feb 2015, 10:04 AM
What I am trying to achieve is a row template(Each row might have 20+ fields).
It needs be one row a page and I need NEXT and PREVIOUS to see other records.
I am trying to achieve this using the row template and here s my code

If I add pagable() it wont render the template rows itself. 
Also it woyld be great if u can help me on making an inline edit in this.

@(Html.Kendo().Grid<CatagoryViewModel>()
    .Name("grid")
    .HtmlAttributes(new { style = "width: 750px;height:430px;" })
    .Columns(columns =>
    {
        columns.Template(e => { }).ClientTemplate(" ").Width(140).Title("Catagory Details");
    }).Pageable()
    .ClientRowTemplate(
        "<tr data-uid='#: CatagoryId #'>" +
            "<td class='details'>" +
                "<span >#: CatagoryName #</span>" +
                "<span >#: Catagorydescription #</span>" +
            "</td>" +         
         "</tr>"
    )
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("GetAllCatagory", "Home")
    )
))




1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 10 Feb 2015, 09:21 AM
Hello,

Using paging should not make a difference. Could you check the attached sample project and let me know if I am missing something?
In order for inline editing to work with a row template you should:
  • Set the data-uid attribute to the actual uid value:

    "<tr data-uid='#: uid #'>" +
  • Use the same number of cells in the row template as the number of columns. The columns also have to be bound in order for the editors to be created.


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