---
title: "how to use conditions in telerik grid?"  
description: "how to use conditions in telerik grid?"  
author: "Jayden Bell"  
published: 2014-11-20  
updated: 2014-11-20  
canonical: https://www.mindstick.com/forum/12650/how-to-use-conditions-in-telerik-grid  
category: "asp.net mvc"  
tags: ["telerik grid", "telerik mvc"]  
reading_time: 1 minute  

---

# how to use conditions in telerik grid?

I am having a telrik grid in my [MVC 3.0](https://www.mindstick.com/forum/543/spring-mvc-3-0-crud-application-using-annotation-and-jdbc-template) application. In grid I want to [disable](https://www.mindstick.com/forum/12901/how-to-disable-enable-input-box-in-aspx-with-value-from-sql) one of my [column](https://www.mindstick.com/forum/33860/how-to-calculate-column-summary-in-sql-server) based on [dates](https://yourviews.mindstick.com/story/1513/7-zodiac-signs-astrology-dates-meanings-amp-compatibility) .

```
{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(@@item.DocumentLabel).Width(180)
```

I have a [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) in [model](https://yourviews.mindstick.com/view/81334/america-is-reopening-after-corona-lockdown-but-on-swedish-model) which brings the expiray date from DB & if the expiry date is less or todays date has passed the expiry date ([i.e](https://answers.mindstick.com/qa/39877/what-state-was-the-first-to-enter-the-union-i-e-was-the-first-to-ratify-the-united-states-constitution) DateTime.Now) then the link of the above column needs to be disabled or the [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) in that column(i.e [links](https://www.mindstick.com/blog/415/css3-links)) needs to be disabled , it shud not get clicked

## Replies

### Reply by Anonymous User

.ClientTemplate("<#if(condition){#><a href=\"WaitingApprove/<#= LatestVersionId #>\">" + "if link" + "</a><# }

else{#><a href=\"Edit/<#= Id #>\">" + "else link" + "</a> <# } #>")


---

Original Source: https://www.mindstick.com/forum/12650/how-to-use-conditions-in-telerik-grid

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
