This question is locked. New answers and comments are not allowed.
Hi,
Thanks for the great product! :)
After upgrading from 2009 Q3 to 2010 Q1 and MVC rc1 to MVC rc2, my this expression has error:
Html.Telerik().Grid(Model)
.Name("ASSETGrid")
.Columns(columns =>
{
columns.Bound(x => x.TX_TYPE).Title("Type");
columns.Bound(x => x.TX_REFNO).Title("Ref");
columns.Bound(x => x.DESCRIPTION).Title("Desc");
columns.Bound(x => x.CREATOR).Title("Creator");
columns.Bound(x => x.CREATION_DATE.ToString("yyyy-MM-dd")).Title("Created");
columns.Bound(x => x.LAST_UPDATE_DATE).Format("{0:yyyy-MM-dd}").Title("Last updated");
columns.Bound(x => x.TX_STATUS).Title("Status");
columns.Bound(x =>
(x.CurrentState.CanSelect(AppHelper.GetCurrentUser(), AppHelper.GetCurrentUserRole()) ? Html.ActionLink("Select", "SelectAsCurrent", new { TX_KEY = x.TX_KEY }).ToString() : Html.ActionLink("Details", "Details", new { TX_KEY = x.TX_KEY }).ToString()) + " " +
(x.CurrentState.CanAccept(AppHelper.GetCurrentUser(), AppHelper.GetCurrentUserRole()) ? Html.ActionLink("Accept", "Accept", new { TX_KEY = x.TX_KEY }).ToString() + " " : "") +
(x.CurrentState.CanCancel(AppHelper.GetCurrentUser(), AppHelper.GetCurrentUserRole()) ? Html.ActionLink("Cancel", "Cancel", new { TX_KEY = x.TX_KEY }).ToString() + " " : "") +
(x.CurrentState.CanReject(AppHelper.GetCurrentUser(), AppHelper.GetCurrentUserRole()) ? Html.ActionLink("Reject", "Reject", new { TX_KEY = x.TX_KEY }).ToString() + " " : "") +
(x.CurrentState.CanReturn(AppHelper.GetCurrentUser(), AppHelper.GetCurrentUserRole()) ? Html.ActionLink("Return", "Return", new { TX_KEY = x.TX_KEY }).ToString() + " " : "") +
(x.CurrentState.CanSubmit(AppHelper.GetCurrentUser(), AppHelper.GetCurrentUserRole()) ? Html.ActionLink("Submit", "Submit", new { TX_KEY = x.TX_KEY }).ToString() + " " : "") +
""
).Encoded(false).Title("Action");
})
//.Filterable()
.Pageable()
.Sortable()
.Render();
InvalidOperationException occurred,
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
in line 49, UI\Grid\Columns\GridBoundColumn.cs file
#if MVC2
Metadata = ModelMetadata.FromLambdaExpression(expression, new ViewDataDictionary<TModel>()); (<<----- error)
Title = Metadata.DisplayName;
Format = Metadata.DisplayFormatString;
Visible = Metadata.ShowForDisplay;
#endif
it seems I cannot use expression anymore~~ :(
Looking forward to hearing from you
Thanks~
Best wishes, always
Billy