Hello
I have question how to refresh control after edit?
I tried:
public JsonResult Update([DataSourceRequest] DataSourceRequest request, ProductCategoryViewModel category) { if (ModelState.IsValid) { var services = new ProductCategoryServices(db); services.Update(category, ModelState); } var result = db.ProductCategories.ToTreeDataSourceResult(request, cat => cat.ProductCategoryId , cat => cat.FKParentProductCategoryId , cat => cat.ToProductCategoryViewModel(request) ); return Json(category, JsonRequestBehavior.AllowGet); // return Json(new[] { category }.ToTreeDataSourceResult(request, ModelState)); }PS. Stupid question but where is edit post option? :)
Hi Team,
I am using kendo UI editor and image browser in MVC View in form of HTML. I have to upload an image. I have created one action method and bound to the upload function of image browser. When i upload, image gets saved to the location and after that an automatic thumbnail call goes to app which has a url and pass the path parameter which is the file name. In case of new file upload it pass the path value to undefined. In upload action i am returning json response in form of:
var json = new { name = Path.GetFileName(file.FileName),
type = "f",
size = file.ContentLength
};
return Json(json, "text/plain");
Thumbnail action method is the default action method of EditorImageBrowserController class which i am using.
Please let me know if i am missing anything or do i need to override thumbnail action. If yes please provide me example.
Thanks.

Hi,
Is it possible, that dataSource.sync(); causes a double postback if using a slow connection ?
It looks like that the client postback twice if the server doesn't reply within e.g. 15 seconds.
The code:
var dataSource = $("#" + gridname).data("kendoGrid").dataSource;dataSource.sync();Are there any good ways to prevent double postbacks using the kendo framework?
Thanks.
Hi,
I am trying to use the @Html.Kendo().Grid(Model) to generate a row template, but it doesn't do what I want... The code I have so far is:
@(Html.Kendo().Grid(todayFocus) .Name("TodaysFocus") .Columns(columns => { columns.Template(c => { }).ClientTemplate(" ").Title("Today's Focus"); columns.Template(c => { }).ClientTemplate(" ").Title("Mid Day"); columns.Template(c => { }).ClientTemplate(" ").Title("End Dday"); columns.Template(c => { }).ClientTemplate(" ").Title("Plan"); columns.Template(c => { }).ClientTemplate(" ").Title("Target"); }) .RowTemplate(grid => @<text> <td>@item.TaskName</td> <td>@item.MidDay</td> <td>@item.EndDay</td> <td>@item.Plan</td> <td>@item.Target</td> </text>))And what I am getting for each row is:
<tr> <td colspan="5"> /<td> <td>Task Name</td> <td>10</td> <td>20</td> <td>30</td> <td>40</td></tr>Why am I getting the extra <td colspan="5"> and how do I get rid of it?
Thanks
Hi,
I'm using a user-defined template for grid, it looks fine in Chrome, but a red frame appears around the text box.
How to solve it?
Thanks.
I downloaded the code from http://www.telerik.com/download/aspnet-mvc
and followed the instructions for installing from http://docs.telerik.com/kendo-ui/aspnet-mvc/introduction
but I seem to be missing some pretty key pieces of code - for a start I do not have the Examples directories such as..
wrappers\aspnetmvc\Examples\VS2013
..and when I try to run any of the "Demo" code on the website the compiler complains it doesn't know about
Kendo.Mvc.Examples.Models.Scheduler.TaskViewModel for example.. so I am assuming this is also because I am missing the Examples?
HELP!!
I use Grids in many places and in most, there are Popup Edit and/or Add options using the Grid's Editor Template i.e. .TemplateName("_AddEditPerson")).
This works fine, but there are quite a few occasions where I need to bring up the same edit popup but directly, for a given ID and not via the Grid. e.g. If a user looks at a list of notifications which point to various entity types to be found in various Grids. They just want quickly access that item without leaving where they are for another Grid.
I would like to do this in such a way that updates from the Grids still work (and are bound immediately back to the grid as normal), but that the same editor templates can be used for direct updates.
My idea to achieve this is as follows:
- create a hidden Kendo (popup) window on the calling page
- upon request, via javascript, open the Window with its contents populated with a partial view (_DirectEditPerson) by a Controller Action (HomeController/DirectEditPerson)
- the _DirectEditPerson Partial View contains an Ajax Form containing the regular Grid Editor Template (_AddEditPerson) loaded via a @Html.Partial statement
I have shown how this is setup in the attached image. The edit button on each line points to the regular editor window as normal. There is then a button at the bottom of the Grid which opens Person with ID 3 (just for test purposes) without going via the Grid.
The window correctly opens with all but the Gender dropdown filled in. The dropdown which seems to have no value, even though I know its being passed. If I set the value and press update, there is a validation error with the same field.
Is this achievable? Can you give me any pointers? Telerik suggested explicitly set the model value to the DropDownList (using Value method) or use MVVM binding (used by the Grid internally) to bind the edited model to the editor template, but I'm not sure how to do this. As I have quite a lot of Grid Editor templates, I do want to re-use them so that they work from both their Grid and also directly like this.
Thanks,
Chris
@( Html.Kendo().Grid<User>() .Name("grid") .Pageable(config => config .Info(true) ) .Sortable() .Filterable() .ColumnMenu(config => config.Enabled(true)) .Columns(config => { config.Bound(user => user.Id); config.Bound(user => user.FirstName); config.Bound(user => user.LastName); config.Bound(user => user.UserName); config.Bound(user => user.Type) .ClientTemplate("#=Type#") .Filterable(filter => filter .UI("typeFilter") .Extra(false) ); } ) .DataSource(dataSourceBuilder => dataSourceBuilder .WebApi() .Read(config => config .Url("/api/data/users") ) ) )----<script type="text/javascript"> function typeFilter(element) { element.kendoMultiSelect( { dataTextField: "name", dataValueField: "id", dataSource: { data: [ { id: 1, name: "Builder"}, { id: 2, name: "Police Man"} ] } }); }</script>
Hi Kendo,
Building user-controls - or controls that may be added on many pages throughout a website - how is this done with Kendo?
I can think of - at least - 3 different types of usercontrols:
Is it possible to build those 3 types of controls so they may be re-used in more than one page ?
Thank you.