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

[Solved] Cannot use only server templates in Ajax or WebService binding mode. Please specify a client template as well.

4 Answers 822 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.
nachid
Top achievements
Rank 1
nachid asked on 28 Jun 2010, 09:51 AM
I am using 2010.1.416
I have a very simple grid and I cannot make it work using AJAX
All what I want is to delete one row.

I am having this error message
Cannot use only server templates in Ajax or WebService binding mode. Please specify a client template as well.

and here is the code I am using in a partial view

<% Html.Telerik().Grid(Model)
                .Name("Grid")
                .DataKeys(dataKeys => dataKeys.Add(c => c.UserID))
                .DataBinding(dataBinding => dataBinding.Ajax().Delete("RemoveUser", "Account"))
                .Columns(columns =>
                                {
                                    columns.Template(c =>   {%>
                                                                                        <img  alt="<%=c.Provider.Name%>"
                                                                                                 src="<%=Url.Content(@"~/Assets/Icons/" + c.Provider.Name + ".png")%>"
                                                                                       />
                                                                                  <%
                                                                                }
                                                   ).Title("Provider");
                                    columns.Bound(o => o.Identifier).Width(200);
                                    columns.Bound(o => o.LastActivity).Format("{0:MM/dd/yyyy}").Width(120);
                                    columns.Command(commands => commands.Delete()).Width(200);

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


I am quite sure I am missing something very obvious
Thank you for your help

Regards
Nachid

4 Answers, 1 is accepted

Sort by
0
Stefan
Top achievements
Rank 1
answered on 12 Jul 2010, 10:59 AM
Did you figure out how to fix the error? I'm having the same problem here
0
Roch Olivier
Top achievements
Rank 1
answered on 10 Aug 2010, 09:51 AM
Hi there , i had the same problem, till i removed the .Template parts in my view
Just take the bold part out ..should work fine then

.Columns(columns =>
                                {
                                    columns.Template(c =>   {%>
                                                                                        <img  alt="<%=c.Provider.Name%>"
                                                                                                 src="<%=Url.Content(@"~/Assets/Icons/" + c.Provider.Name + ".png")%>"
                                                                                       />
                                                                                  <%
                                                                                }
                                                   ).Title("Provider");

                                    columns.Bound(o => o.Identifier).Width(200);
                                    columns.Bound(o => o.LastActivity).Format("{0:MM/dd/yyyy}").Width(120);
                                    columns.Command(commands => commands.Delete()).Width(200);

                    })

0
Wai Kei
Top achievements
Rank 1
answered on 13 Oct 2010, 03:55 PM
I have the same problem. Yes removing the template part will make it work but the column template is very essential to the grids in my application.

Does Telerik Support have any suggestions on how to get both AJAX and column templates to work?

Thanks.
0
Issam
Top achievements
Rank 1
answered on 18 Jan 2011, 08:21 AM
Tags
Grid
Asked by
nachid
Top achievements
Rank 1
Answers by
Stefan
Top achievements
Rank 1
Roch Olivier
Top achievements
Rank 1
Wai Kei
Top achievements
Rank 1
Issam
Top achievements
Rank 1
Share this question
or