This question is locked. New answers and comments are not allowed.
I need to populate the first cell in rows with a linkaction button on if I have a valid item,,, My grid is below
<div id="thePanel" class="gridSection prepend-1 span-22 last">
<% Html.Telerik().Grid(Model)
.Name("Grid")
.ClientEvents(events => events
.OnRowSelect("onRowSelected")
.OnLoad("onLoad")
)
.DataKeys(keys => keys.Add(p => p.Id))
.Columns(columns =>
{
-- this only need to show the button link if data is correct Sudo code wrpping it
if (value = newvalue)
{
columns.Bound(x => x.Id).Title("AtoP").Format(Html.ActionLink("Create project", "CreateProject", new { id = "{0}" }).ToHtmlString()).Encoded(false).Width(60);
}
Else
{
-----empty column.
}
columns.Bound(p => p.Id).Hidden(true);
columns.Bound(p => p.Company);//.Width(100);
columns.Bound(p => p.DeliveryUtilityAccountNumbers);//.Width(200);
columns.Bound(p => p.FacilityName);//.Width(100);
columns.Bound(p => p.Notes).Width(150);
columns.Bound(p => p.Description);//.Width(125);
columns.Bound(p => p.StartDateTime);//.Width(75);
columns.Bound(p => p.EndDateTime);//.Width(75);
columns.Bound(p => p.ScheduleDateTime);//.Width(75);
columns.Bound(p => p.Status);//.Width(75);
})
.DataBinding(dataBinding => dataBinding
.Ajax()
.Select("BindGrid", "Audits")
)
.Scrollable(scrolling => scrolling.Height(400))
.Reorderable(reorder => reorder.Columns(true))
.Selectable()
.Resizable(resizing => resizing.Columns(true))
.Sortable(sorting => sorting.OrderBy(sortOrder => sortOrder.Add(o => o.StartDateTime).Ascending()))
.Filterable()
.Pageable(paging =>
paging.PageSize(50))
.Render();
%>
</div>