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

Sever Binding and Batch update

5 Answers 302 Views
Grid
This is a migrated thread and some comments may be shown as answers.
GrayMeth
Top achievements
Rank 1
GrayMeth asked on 24 Mar 2014, 12:03 PM
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()?

5 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 26 Mar 2014, 11:02 AM
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.

 
0
GrayMeth
Top achievements
Rank 1
answered on 26 Mar 2014, 12:47 PM
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.
0
Petur Subev
Telerik team
answered on 27 Mar 2014, 07:28 AM
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.

 
0
GrayMeth
Top achievements
Rank 1
answered on 28 Mar 2014, 05:50 AM
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?
0
Petur Subev
Telerik team
answered on 31 Mar 2014, 02:58 PM
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.

 
Tags
Grid
Asked by
GrayMeth
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
GrayMeth
Top achievements
Rank 1
Share this question
or