how to use conditions in telerik grid

I am having a telrik grid in my MVC 3.0 application. In grid I want to disable one of my column based on dates .

{Html.Telerik().Grid(Model.PostedDocument)
.Name("PostedDocumentsGrid")
.HtmlAttributes(new { @class = "grid scroll-pane" }) 
.Columns(columns =>
{
columns.Bound(o => o.DocumentLabel).Title(ResourceHelper.GetMessage("Posted_DocumentName")).Template(@<text><a href="@Url.Action("DownloadDocument", "ConsentAndDocument", new { documentId = @item.DocumentId })">@item.DocumentLabel</a></text>).Width(180)

I have a property in model which brings the expiray date from DB & if the expiry date is less or todays date has passed the expiry date (i.e DateTime.Now) then the link of the above column needs to be disabled or the data in that column(i.e links) needs to be disabled , it shud not get clicked

Any help will be appreciated.

Answers


.ClientTemplate("<#if(condition){#><a href=\"WaitingApprove/<#= LatestVersionId #>\">" + "if link" + "</a><# }
 else{#><a href=\"Edit/<#= Id #>\">" + "else link" + "</a> <# } #>")

Need Your Help

API for Natural Language Processing in Android

android nlp

I am trying to make an Android application similar to the one on this website.

What is the point of If-Unmodified-Since/If-Modified-Since? Aren't they superseded by ETags?

http rest http-headers etag if-modified-since

There seem to be two distinct ways to implement conditional requests using HTTP headers, both of which can be used for caching, range requests, concurrency control etc...:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.