This question is locked. New answers and comments are not allowed.
Hi All,
Following is the *.aspx page, where I get compiler error 'Cannot implicitly convert type 'void' to 'object'' just by calling '.Render();' in Html.Telerik().Grid<.... Please note that this page is strongly bound to the order object which has orderLines collection. Any help to fix this would be appreciated.
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebSite.Models.Order>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Details</h2>
<fieldset>
<legend>Order</legend>
<div class="display-label">
<%: Html.LabelFor(model => model.Number)%>
</div>
<div class="editor-field">
<%: Html.TextBox("txtNum",Model.Number, new Dictionary<string, object>() { { "readonly", "true" }, { "Enabled", "false" } })%>
</div>
</fieldset>
<%:
Html.Telerik().Grid<WebSite.Models.OrderLine>("orderLines")
.Name("grdOrderLines")
.Columns(c => c.Bound(o => o.Product))
.Columns(c => c.Bound(o => o.TotalCost))
.PrefixUrlParameters(false)
.Pageable()
.Sortable()
.Filterable()
.Groupable()
.Render();
%>
</asp:Content>
Following is the *.aspx page, where I get compiler error 'Cannot implicitly convert type 'void' to 'object'' just by calling '.Render();' in Html.Telerik().Grid<.... Please note that this page is strongly bound to the order object which has orderLines collection. Any help to fix this would be appreciated.
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebSite.Models.Order>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Details</h2>
<fieldset>
<legend>Order</legend>
<div class="display-label">
<%: Html.LabelFor(model => model.Number)%>
</div>
<div class="editor-field">
<%: Html.TextBox("txtNum",Model.Number, new Dictionary<string, object>() { { "readonly", "true" }, { "Enabled", "false" } })%>
</div>
</fieldset>
<%:
Html.Telerik().Grid<WebSite.Models.OrderLine>("orderLines")
.Name("grdOrderLines")
.Columns(c => c.Bound(o => o.Product))
.Columns(c => c.Bound(o => o.TotalCost))
.PrefixUrlParameters(false)
.Pageable()
.Sortable()
.Filterable()
.Groupable()
.Render();
%>
</asp:Content>