Sever Binding and Batch update

6 posts, 0 answers
  1. GrayMeth
    GrayMeth avatar
    7 posts
    Member since:
    Jan 2014

    Posted 24 Mar 2014 Link to this post

    I have a kendo grid which uses server binding. I need to implement batch update in the same. How can i proceed for this.
    Below is the example of grid I am using.

    @(Html.Kendo().Grid(Model) // Bind the grid to the Model property of the view
    .Name("Grid")
    .Columns(columns =>
    {
    columns.Bound(p=> p.addressId).Hidden(true);
    columns.Bound(p=> p.Name).Title("Name");
    columns.Bound(p=> p.Phone);
    )
    .Pageable() //Enable paging
    .ToolBar(commands => commands.Create())
    //Editable(editable => editable.Mode(GridEditMode.Inline))
    .DataSource(dataSource => dataSource
    .Server()
    //.Batch(true)
    // Configure CRUD -->
    .Model(model => model.Id(p => p.ContactId))
    .Create(create => create.Action("Create", "Home"))
    .Read(read => read.Action("Index", "Home"))
    .Update(update => update.Action("Update", "Home"))
    .Destroy(destroy => destroy.Action("Destroy", "Home"))
    // <-- Configure CRUD
    )
    .DetailTemplate(...)
    )

    Now i want to have a button, on click of which the data in the grid could be updated. What is the best way to proceed with this.
    Batch(true) is not working with Server()?
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 26 Mar 2014 Link to this post

    Hello Akhil,

    Indeed Batch updates and or InCell editing mode are not supported when using Server Binding.

    Kind Regards,
    Petur Subev
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  3. GrayMeth
    GrayMeth avatar
    7 posts
    Member since:
    Jan 2014

    Posted 26 Mar 2014 in reply to Petur Subev Link to this post

    Hey Petur,

    I kind of got that while searching over internet. Now I have changed the gridview to Ajax binding.
    Currently using client detail template in the grid view. There are no tool bars for Save/Edit/Add record, however on click of a Save button i am calling the grid.SaveChanges() method.
    But the changes made in client detail template are not getting reflected. Event the 'dirty' property is not changing to true for any record. Can you help me regarding this.
  4. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 27 Mar 2014 Link to this post

    Hello Akhil,

    Basically when you have a detail template and another child Grid inside of it, the changes made to the inner Grid wont be send to the parent Grid save action method when the save button is clicked. Instead you should declare separate transport for the detail Grid.

    Check the following editing hierarchy demo.

    http://www.telerik.com/support/code-library/grid-ajax-hierarchy-editing

    Kind Regards,
    Petur Subev
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  5. GrayMeth
    GrayMeth avatar
    7 posts
    Member since:
    Jan 2014

    Posted 28 Mar 2014 Link to this post

    Hi ,

    I am using kendo grid in kendo popup window. I need to show one column as hyperlink in the grid. Am trying with the client template. But it is not working. When i tried with the client template  in normal view, it is working. But when i try it in kendo popup window it is not working. Can you provide help in this?
  6. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 31 Mar 2014 Link to this post

    Hello Akhil,

    I am not sure I understand your setup. Basically how to create a hyperlink is covered in the documentation here:

    http://docs.telerik.com/kendo-ui/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/faq#how-do-i-use-action-links?

    Can you give details what exactly you have tried and what was the result in the HTML source?

    When using popup editing mode, and you want to create some link inside of it, you should create it either with attribute binding:

    <img data-bind="attr: { src: imageSrc, alt: imageAlt, title: imageTitle }" />

    Or you should update the src/href URL with the help of the edit event of the Grid.

    Kind Regards,
    Petur Subev
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top