Telerik Forums
UI for ASP.NET MVC Forum
4 answers
104 views
I updated today to the new Q2 2013 service pack, now all editor windows show text rather then icons. 
See attached image
Alan Mosley
Top achievements
Rank 1
 answered on 26 Sep 2013
0 answers
98 views
Hi. I am using Kendo UI in an ASP.NET MVC 4 application (using the Razor view engine) and I keep hitting a problem with how Kendo is auto generating the model structure for the rows in a grid.

I have a view and the model for that view contains a list of items, called Bricks, and then each Brick contains a list of items called BrickQualityMetricDtos. I created an editor template for the Brick class so that the MVC framework would properly name all of the fields. Within that editor template I have a Kendo UI Grid that I am using to display/edit the list of BrickQualityMetricDto classes. Two of the fields in that class are dropdowns, which I am using ForeignKeyColumns for, but every time I edit a row and then select a value of one of the drop downs I get this javascript exception:

"Unable to get property '0' of undefined or null reference"

This exception is getting thrown by this anonymous function:
function anonymous(d,value) {
d.Bricks[0].ExclusionReasonPK=value
}

The exception is being thrown because there is no Bricks member of "d" and therefore it cant get the "0" property. As far as I can tell "d" is an object that represents the model for the row that I am editing because it has fields "ExclusionReasonPK", "BrickSectionPK", "LengthExluded", and "PK" which are all of the fields of the BrickQualityMetricDto class. So the problem is that since the grid is in an Editor Template it is throwing this non-existent Bricks property onto the "d" object before it tries to access the actual properties of the object.

Can you please advise how to get around this limitation? I need to be using an Editor Template because if I don't then I won't get all of the other data fields in my form when I submit the form to my controller action.

Below is the code for my grid, but I am pretty sure that everything is correct in there.

@(Html.Kendo().Grid<BrickQualityMetricDto>()
.Name("BrickQualityMetrics_" + Model.Index)
.Columns(columns =>
{
columns.ForeignKey(e => e.BrickSectionPK, Model.BrickSections, "PK", "Name").Title("Section");
columns.ForeignKey(e => e.ExclusionReasonPK, Model.ExclusionReasons, "PK", "Name").Title("Exclusion Reason");
columns.Bound(e => e.LengthExcluded).Title("Length Excluded (mm)");
columns.Command(command => { command.Edit(); command.Destroy(); });
})
.Events(events =>
{
events.Edit("onBrickQualityMetricsGridEdit");
})
.ToolBar(toolbar => toolbar.Create().Text("Add"))
.BindTo(temp)
.Editable(editable => editable.Mode(GridEditMode.InLine))
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Change("onGridDataSourceChange"))
.Model(model => model.Id("PK"))
.Create(update => update.Action("BrickMetric_Create", "Brick"))
.Update(update => update.Action("BrickMetric_Update", "Brick"))
.Destroy(update => update.Action("BrickMetric_Destroy", "Brick"))
))

EDIT: I just checked again and this problem is not limited to Foreign Key Columns. It is happening on the standard Bound column as well.

Also here is a similar post from the old ASP.NET MVC Telerik forums. It looks like the problem was never fully resolved though: http://www.telerik.com/community/forums/aspnet-mvc/grid/problems-with-grid-in-editor-template-in-collections.aspx
Tim Johnson
Top achievements
Rank 1
 asked on 26 Sep 2013
7 answers
233 views
I just downloaded and installed the 2013.2.716.340 version of the ASP.Net MVC Kendo Complete package.  Then I started a new MVC 4 project with .Net 4.5 in Visual Studio 2012 Update 3.  I ran the new project without touching a single piece of code and get the following javascript error.

Unhandled exception at line 10, column 180 in http://localhost:62497/Scripts/kendo/2013.2.716/kendo.aspnetmvc.min.js0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'jQuery': object is null or undefined


IE says that window.kendo is undefined in one of the window.kendo.jQuery statements.  Is this an environmental issue or is there something wrong with the actual files in this build?  Maybe it has something to do with the way new projects are initialized with VS Update 3.  I messed around with trying to host Kendo in a different MVC 4 project that was created as a standard project, instead of a Kendo project, but I get the same error.  Also, when I tried to bundle the scripts, instead of directly linking them, WebGrease gives an error.  Please, help.
Daniel
Telerik team
 answered on 25 Sep 2013
5 answers
485 views
We use the Kendo Upload to allow customers to upload large number of files for processing.
Some of our customers in countries with poorer internet have run into bandwidth restrictions when trying to upload a large number of files (i.e a 100 files) simultaneously.

The files themselves are not very large, but the number of files causes a problem. To get around this, is it possible to set a upper limit on the number of async uploads that may be in progress at any given time?

So that if there are 20 files selected and added, I'd like them to upload in 2 batches of 10.

Thanks,

Roberto
Dimo
Telerik team
 answered on 25 Sep 2013
1 answer
121 views
Hello, after trying to follow the examples for adding a toolbar in the grid and AS soon as I add in the toolbar I get the error in the title. 

here's the aspx code: 
<%: Html.Kendo().Grid<TSAEMSV3.Models.AirportTrainingViewManagementModel>()
    .Name("grid")
 
    .Columns(columns =>
        {
            columns.Bound(x => x.Record).Width(65);
            columns.Bound(x => x.Code).Width(65);
            columns.Bound(x => x.PeopleTrained).Width(100);
            columns.Bound(x => x.TrainingTypes).Width(100);
            columns.Bound(x => x.Trainer).Width(100);
            columns.Bound(x => x.TrainingDate).Format("{0:MM/dd/yyyy}").Width(100);
        }
    )
    .ToolBar(toolbar =>
        {
            toolbar.Template(() =>
            { %>
               <div class="toolbar">
                        <label class="category-label" for="category">Show products by category:</label>
                             
                            </div>
            <%});
        })
    .Pageable()
    .Sortable()
    .Scrollable()
    .HtmlAttributes(new { style = "height:500px;" })
    .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(50)
            .Read(read => read.Action("RetrieveTrainingManagementGrid", "AirportTraining"))
            );
    %>
I have tried using the .Render() as well at the end of the control but no success.  Any help would be greatly appreciated. 
Alexander Popov
Telerik team
 answered on 25 Sep 2013
3 answers
508 views
Dear KendoUI-Team!
I have a hierarchy grid. I want to expand a master grid row in javascript. The javascript function is called by a custom command.
I succeeded to locate the the row.
When I call the expandRow() method something strange happens. The Row is expanded, but the current scroll position in the browser jumps to the top of the window. It looks like the jump happens after the expansion.
Even if I call the .click() function of the .t-plus element directly in javascript this strange behaviour occurs.

If I perform a mouse click on the expand item in the row, the scroll position of the browser window does not change.

Do you have any Ideas to solve this problem or find the cause?

brgds
Malcolm Howlett
Nikolay Rusev
Telerik team
 answered on 25 Sep 2013
1 answer
95 views
i can not get sub menus to open in IE11
Also i could not log into this site with IE11, clicking button sends no request
is this a known bug,
thanks
Kamen Bundev
Telerik team
 answered on 25 Sep 2013
4 answers
469 views
I set up a simple grid like this using the Razor syntax:

@(Html.Kendo().Grid<VideoGames.Game>(Model)
  .Name("theGrid")
  .Columns(c =>
  {
    c.Bound(p => p.Name).Width(200);
    c.Bound(p => p.Price).Format("{0:c}").Width(100);
    c.Bound(p => p.Genre).Width(100);
    c.Bound(p => p.ImageUrl).ClientTemplate("<img src='#= ImageUrl #' alt='' />").Width(150);
    c.Command(cmd => { cmd.Edit(); });
  })
  .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
  .Pageable()
  .ToolBar(c => c.Save())
  .DataSource(d => d.Ajax()
                    .Model(m => m.Id(p => p.Name))
                    .Update(c => c.Action("UpdateGame", "Home")))
  )

The problem is that the .Update(...) in the DataSource doesn't expose the callback that the underlying KendoUI does:

$("#theGrid").kendoGrid({
        dataSource: {
          data: data,
          batch: true,
          schema: {
            model: {
              id: "GameID",
              fields: {
                GameID: { editable: false, nullable: true },
                Name: "Name",
                Price: { type: "number" },
                ReleaseDate: { type: "date" },
                Genre: "Genre",
                Rating: "Rating",
              }
            }
          }
        },
        transport: {
          update: {
            url: "/home/updategame",
            success: onUpdateSuccess,
            error: onUpdateError
          }
        }
        toolbar: [ "Save" ],
        height: 400,
        editable: true,
        scrollable: true,
        columns: [
          {
            field: "Name",
            title: "Title"
          },
          {
            field: "Price",
            title: "Price",
            format: '{0:c}'
          },
          {
            field: "ReleaseDate",
            title: "Rel Date",
            template: '#= kendo.toString(ReleaseDate,"MM/dd/yyyy") #'
          },
          {
            field: "Genre"
          },
          {
            field: "Rating"
          },
        ],
      });


Since the transport.update (in the JavaScript) are passed through to the $.ajax handler, we can wire up to success and error, but can't via the MVC. We can do this after the fact, but it's not expected behavior. Can we get this added to future versions of the MVC package?
KV
Top achievements
Rank 1
 answered on 24 Sep 2013
8 answers
519 views
Gents,

How do we add Telerik reporting to a MVC 4 razor Project, do we have to "WorkAround" using ASCX w /ASP.NET?


Thanks  
KS
Top achievements
Rank 1
 answered on 24 Sep 2013
4 answers
355 views
I have a current asp.net website using Telerik Reporting and I want to migrate to a Kendo UI MVC solution but don't see any documentation on how it works with Reporting. Can someone point me in the right direction? Thanks.
KS
Top achievements
Rank 1
 answered on 24 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?