I have a Html.Telerik().Grid() that is bound to a model in my MVC view. I want it to return a link based on a value in the appsettings in the web.config. Basically, if this is the dev server then show the links but not on the production server, is that possible? I use Ajax binding and my bound column looks as follows:
columns.Bound(f => f.TechnicalKey)
.ClientTemplate("<# if (FileName != 'status.txt' && StatusText=='PROCESSED') { #><a href='/AType/DownloadAFile/<#= TechnicalKey #>'>Download</a> <# } else { #>Not available<# } #>")
.Title("").Filterable(false);
I want the status.txt to be a link on development but not on production (this is how it is now)
Thank you.
Jack
I actually achieved this by adding a property in the domain object as follows:
and then in the view I had:
This way I cater for the initial server bound data and the later Ajax bound data.