Telerik Forums
UI for ASP.NET MVC Forum
8 answers
87 views
I've noticed now the grid is posting filter data even though I haven't defined any filter on the client/server side. This is causing a Binding error - DataSourceRequest.

When I create a dummy filter with the wrapper it no longer throw exception. However even if I disable the Filterable option it still throws and passing filter post data.
.DataSource(ds => ds.Ajax()
                           .Batch(true)
                           .Filter(f=> f.Add(d=> true))
See the examples of post data between working and not. I'm not sure if it's the wrappers or the JS but thinking it might be Js causing the Binding to throw.

Old Post Format:
sort=FacilityName-asc&page=1&pageSize=25&group=&filter=

New Post Format Failing:
sort=FacilityName-asc&page=1&pageSize=25&group=&filter=undefined~undefined~undefined

New Post Format Working - see above for the dummy filter:
sort=FacilityName-asc&page=1&pageSize=25&group=&filter=undefined~eq~null


Please advise.
Patrick
Nikolay Rusev
Telerik team
 answered on 25 Jul 2013
1 answer
166 views
Hi,
How can I add validation for the fields like title and description or even to resources in MVC ?
Vladimir Iliev
Telerik team
 answered on 25 Jul 2013
1 answer
221 views
Sorry if this has been covered somewhere, but I'm new to Kendo and am having trouble finding examples and/or documentation on this.

Basically I'm trying to figure out how to leverage a LinqtoSql entity framework in a .NET MVC application to handle edits/updates/deletes to my database with a Kendo Grid. I'm coming from an AJAX .NET webforms (so not even MVC!) world where tying a .NET grid to a LinqDataSource was pretty much all you needed to handle CRUD operations.

Thanks!
Petur Subev
Telerik team
 answered on 25 Jul 2013
6 answers
105 views
Hi, 
    I am trying to render a different partial view based on a property of the model. I will then need to pass the model from the current enumeration to the Html.RenderPartial called in the template 

as below i need to pass the current model from the edit to the RenderPartial i.e. "themodel".  How do I get the syntax to pass the model to it?

Thanks 

@using Assessments.Models;
@model IEnumerable<FallsAssessment>
 
@{
    ViewBag.Title = "FallsAssessmentList";
}
 
<h2>FallsAssessmentList</h2>
@Html.Kendo().Grid(Model).Name("FallsAssessments").Columns(columns=>
    {
        columns.Bound(m => m.AssessmentType).Title("Assessment Type");
        columns.Bound(m=> m.Ward).Title("Ward");
        columns.Bound(m=>m.LastUpdated_TS).Title("Last Updated");
        columns.Bound(m => m.LastUpdatedBy).Title("User");
        columns.Bound(m => m.Score);
        columns.Command(m => m.Edit().Text("Edit"));
    }
    ).ToolBar(t=>t.Create()).DataSource(d=>d.Ajax()
        .Model(
            model=>
                {
                    model.Id(id=>id.EventID);
                    model.Field(field=>field.EventID).Editable(false);
                }).Create("Create", "FallsAssessment").Update("Update", "FallsAssessment")).Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("edit-template"))
               
 
              FallsAssessmentFallsAssessmentFallsAssessment
 
<script id="edit-template" type="text/x-kendo-template">
#if(AssessmentType=='Child'){#
@Html.RenderPartial("AdultAssessment",themodel)
#}else{#
@Html.RenderPartial("AdultAssessment", themodel)
#}
</script>
Daniel
Telerik team
 answered on 25 Jul 2013
1 answer
568 views
I am following the Using Kendo UI with MVC4 WebAPI OData and EF article.  After installing KendoUI and making sure all references are set, I type in three characters, and get the following error:
  • Uncaught TypeError: Object #<Object> has no method 'slice'
I cleaned up kendo.web.min.js and the error is occuring around line 3498:
success: function (n) {
     var i = this,
         r = i.options;
     return i.trigger(wt, {
         response: n,
         type: "read"
     }), n = i.reader.parse(n), i._handleCustomErrors(n) ? (i._dequeueRequest(), t) : (i._pristine = et(n) ? e.extend(!0, {}, n) : n.slice ? n.slice(0) : n, i._total = i.reader.total(n), i._aggregate && r.serverAggregates && (i._aggregateResult = i.reader.aggregates(n)), n = i._readData(n), i._pristineData = n.slice(0), i._data = i._observe(n), i._addRange(i._data), i._process(i._data), i._dequeueRequest(), t)

The Kendo UI widgets are loading just fine as well as the css:

<link href="~/Content/kendo/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo/kendo.default.min.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.9.1.min.js"></script>
<script src="~/Scripts/kendo/kendo.web.min.js"></script>
<script src="~/Scripts/kendo/kendo.aspnetmvc.min.js"></script>
<script src="~/Scripts/appScripts.js"></script>
And I am seeing the same error both with using the Razor MVC helper/extension:

@(Html.Kendo().AutoComplete()
    .Name("userAutoComplete")                   // specifies the "id" attribute of the widget
    .DataTextField("USERNAME")
    .DataSource(source =>
        {
            source.Read(read =>
                {
                    read.Url("/api/user");
                })
                  .ServerFiltering(true);       // if true, the DataSource will not filter the data on the client
        }
    )
)
and through directly through JS:

/// <reference path="kendo/kendo.aspnetmvc.min.js" />
/// <reference path="kendo/kendo.core.min.js" />
/// <reference path="kendo/kendo.autocomplete.min.js" />
/// <reference path="kendo/kendo.web.min.js" />
 
$(document).ready(function () {
    // load up KendoUI
     
    // gets data from /api/user
    var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: "/api/user"
            }
        }
    });
 
    $("#userSearch").kendoAutoComplete({
        dataSource: dataSource,
        dataTextField: "USERNAME",
        minLength: 3
    });
 
    $("#userSearch").on('input', function () {
        console.log($("#userSearch").val());
    });
 
}); // $(document).ready()


I'm sure this is something simple that I may be missing.  I have tried both with the web and all js files.

Any assistance would be appreciated.


Thanks.

B
Top achievements
Rank 1
 answered on 24 Jul 2013
1 answer
87 views
Hello again,
The grid,supports to double-click the column header margins,and resize automatically to its longest value?
,something like is in the windows Explorer and you see the files in Detail format.

Regards,
Daniel
Dimiter Madjarov
Telerik team
 answered on 24 Jul 2013
5 answers
496 views
I am having difficulty working out how to add a Date picker to the Grid ToolBar in order that I use it to filter a large data set (500,000+ reords).

The documentation for showing how to do this for Kendo UI doesn't translate easily to MVC warpper versions.
Vladimir Iliev
Telerik team
 answered on 24 Jul 2013
1 answer
126 views
Hello,

I am new to KendoUI MVC .... I want to do create a Kendo UI MCV grid just  like Telerik Grid demo   : Client-Side Insert/Update/Delete

Please see the attachment - I appreciated all your helps

Thanks,
Ann
Vladimir Iliev
Telerik team
 answered on 24 Jul 2013
2 answers
63 views
Hello,

the following bug only occurs in IE 8 and is only reproduceable with IE 8. It is not reproduceable, if you switch your browser to IE 8 mode (via IE Toolbar). So please use a "real" IE 8 browser to reproduce:

OK, here is the bug:
If you add the first row to an empty grid (grid is in batch mode) it is working fine. After you inserted the new row, the grids renders the first cell in edit mode. Now if you add another row, the cell automatically switches from edit-mode to display mode. This occurs for every new grid row > 1.

It also seems, that the bug is connected when using custom Editor Templates (UIHint property set to reference to a custom editor grid cell template). For example I created a simple EditorTemplates that renders the Kendo Auto-Complete Textbox when the grid cell is in edit mode.

Do you have any ideas what can cause the bug in IE 8, or do you need a sample application to reproduce the bug?
BigzampanoXXl
Top achievements
Rank 1
 answered on 24 Jul 2013
2 answers
63 views
Hello,

it seems a new has been introduced with the 2013 Q2 release. With Release 2013 Q1 SP it worked fine.

I have a ajax grid and have the "Member" property set on the columns, so I will know which column was clicked for sorting when reaching the ajax read method on the controller.
Here is a snippet of the razor view where I have set the "Member" property on the columns:
columns.Bound(c => c.ItemAttributes)
                       .ClientTemplate("#=gridClientTemplate(Unread, 'begin')#" + template + "#=gridClientTemplate(Unread, 'end')#")
                       .Title(Model.FolderColumns[id].ColumnDisplayName)
                       .Hidden(hiddenColumn)
                       .Width(240)
                       .Column.Member = Model.FolderColumns[id].ColumnUniqueName;
When I click on a the header of the column the Ajax Read Method is called. Now the problem is, that I always get "undefined" instead of the clicked Column-Name in the request.Sort[INDEX].Member property. Please take a look at the attached screenshot.

This is a very serious bug in the 2013 Q2 release, cause I can't do the column sorting anymore. Please try to fix that bug as soon as possible in one of the next Internal Builds.
If you need any more infos, just tell me. Thanks.
BigzampanoXXl
Top achievements
Rank 1
 answered on 24 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?