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

[Solved] Grid error with jQuery 1.6.1

1 Answer 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
BC
Top achievements
Rank 1
BC asked on 20 May 2011, 02:27 AM

I get an error when editing items in a Grid more than once using jQuery 1.6.1 . The first time I edit and save, it works as expected, but then fails when I try to edit any record again. I have confirmed that the error doesn't happen using jQuery 1.5.1.

The error is 
    1. Uncaught TypeError: Cannot call method 'value' of undefined
      1. $t.grid.ModelBinder.binders..t-datepicker :inputtelerik.grid.editing.js:1059



I can reproduce the error with the editingajax sample code from your website, copied below

Html.Telerik().Grid<EditableProduct>()
        .Name("Grid")
        .DataKeys(keys =>
        {
            keys.Add(p => p.ProductID);
        })
        .ToolBar(commands =>
        {
            commands.Insert().ButtonType(type).ImageHtmlAttributes(new { style = "margin-left:0" });
        })
        .DataBinding(dataBinding =>
        {
            dataBinding.Ajax()
                .Select("_SelectAjaxEditing", "Grid")
                .Insert("_InsertAjaxEditing", "Grid")
                .Update("_SaveAjaxEditing", "Grid")
                .Delete("_DeleteAjaxEditing", "Grid");
        })
        .Columns(columns =>
        {
            columns.Bound(p => p.ProductName).Width(210);
            columns.Bound(p => p.UnitPrice).Width(130).Format("{0:c}");
            columns.Bound(p => p.UnitsInStock).Width(130).Format("{0:N}");
            columns.Bound(p => p.LastSupply).Width(130).Format("{0:d}");
            columns.Bound(p => p.Discontinued)
                   .ClientTemplate("<input type='checkbox' disabled='disabled' name='Discontinued' <#= Discontinued? checked='checked' : '' #> />");
            columns.Command(commands =>
            {
                commands.Edit().ButtonType(type);
                commands.Delete().ButtonType(type);
            }).Width(180).Title("Commands");
        })
        .Editable(editing => editing.Mode(mode))
        .Pageable()
        .Scrollable()
        .Sortable()


Im using Telerik's Q1 2011 release.

Any idea when you will support jQuery 1.6.1?

1 Answer, 1 is accepted

Sort by
0
Roger
Top achievements
Rank 1
answered on 22 Jun 2012, 01:16 AM
 
Tags
Grid
Asked by
BC
Top achievements
Rank 1
Answers by
Roger
Top achievements
Rank 1
Share this question
or