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

[Solved] .DetailView not found

1 Answer 26 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.
Abu
Top achievements
Rank 1
Abu asked on 20 Aug 2010, 03:15 AM
Newbie to telerik..so figure if this is too simple a question.

I am trying to get a grid to work with master & detail templates. However when I try running it i get a syntax error.
Also when coding, intellisense does not bring up the .DetailView as an option. I am using the MVC2 Telerik dll in my project.

Here is the code..
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<mykey>>" %>
<%@ Import Namespace="ProdAuthDbLib" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
prodAdmin - User
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%= Html.Telerik().Grid<ProdAuthDbLib.mykey>("reg_mykeys")
        .Name("mykeysGrid")
        .DataKeys(k => k.Add(y => y.ID))
        .Columns(columns =>
        {
            columns.Bound(y => y.Serial).ReadOnly().Width(100);
            columns.Bound(y => y.UserName).Width(200);
            columns.Bound(y => y.EmailAddress).Width(300);
            columns.Command(s =>
            {
                s.Edit();
            });
        })
.DetailView(detailView => detailView.Template(y => 
{
%>
<ul>
<li>ID: <%= y.ID %></li>
<li>Accessed: <%= y.Accessed %></li>
</ul>
<%
}))
  .DataBinding(b => b.Server()
            .Update("UpdateUser", "Key")
        )
        .Pageable(pager => pager.PageSize(20))
        .Sortable()
        .Filterable()
    %>

</asp:Content>

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Abu
Top achievements
Rank 1
answered on 20 Aug 2010, 03:27 AM
Never mind.. upgraded to the BETA version and it is there.
Tags
Grid
Asked by
Abu
Top achievements
Rank 1
Answers by
Abu
Top achievements
Rank 1
Share this question
or