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

Templates In Ajax Editing Grid

4 Answers 95 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.
Kapil Koli
Top achievements
Rank 1
Kapil Koli asked on 04 Mar 2010, 11:57 AM
Hi,
    I am usung telerik grid with one or more template columns , containing HTML Helpers.
    But its not working well. Its giving me the err - "Can not use templates  in Ajax or web service binding mode."

    Is there any way to avoid this?
    Following is the code that I am using for grid.

<%Html.Telerik().Grid(Model)
    .Name("Grid")
    .Toolbar(commands => commands.Insert())
    .DataKeys(keys => keys.Add(c => c.RoleID))
    .DataBinding(dataBinding => dataBinding.Ajax()
        .Select("_SelectAjaxEditing", Home
        .Insert("_InsertAjaxEditing", Home")
        .Update("_SaveAjaxEditing", "Home
        .Delete("_DeleteAjaxEditing", "Home
    )
    .Columns(
    columns =>
      {
        columns.Add(o =>
          {
            %>
            <%=Html.RadioButton("rdoSelectRole",new {id = "SelectRole"}, false) %>
            <%
          })
          .Title("Select")

        columns.Add(o =>
          {
            %>
              <%= Html.Encode(o.RoleName) %>
            <%
          })
          .Title("Role Name")

        columns.Add(o =>
          {
            %>
              <%= Html.Encode(o.Description)%>
            <%
          })
          .Title("Description")

        columns.Add(o =>
          { 
            %>
              <%=Html.DropDownListFor(model => o.Status, new SelectList(new string[] { "Enabled", "Disabled" }), new { CssClass = "input-config" })%>
            <%
          })
          .Title("Status")

        columns.Command(commands =>
        {
          commands.Edit();
          commands.Delete();
        })

        })
        .Scrollable()
        .Pageable()
        .Render();
       
  %>

4 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 04 Mar 2010, 12:15 PM
Hello Kapil Koli,

In Q3 2009 release of the Telerik Extensions for ASP.NET MVC  templates does not support Ajax binding. One possible workaround is to use Format(...) of the column.

Nevertheless I will suggest you use the latest version of the Telerik Extensions. Here a link to the demos.

Regards,
Georgi Krustev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kapil Koli
Top achievements
Rank 1
answered on 04 Mar 2010, 12:22 PM
Thanks Georgi.

As you have said the problem is with Q3 2009 but I am using Q1 2010.
Does it have the same problem?
If yes, what will be the solution?
I need to use Ajax editing and template column together.

TIA.
Kapil
0
Atanas Korchev
Telerik team
answered on 04 Mar 2010, 12:36 PM
Hello Kapil Koli,

Server templates cannot be supported for Ajax binding. That's why we introduced client templates. Also you can use the Format method. There are lots of forum threads which show how to do the same. You can check this help topic.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rafael
Top achievements
Rank 1
answered on 11 Feb 2011, 01:00 PM
how could I apply desirable theme to grid popup window in edit mode?
Tags
Grid
Asked by
Kapil Koli
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Kapil Koli
Top achievements
Rank 1
Atanas Korchev
Telerik team
Rafael
Top achievements
Rank 1
Share this question
or