binding acolumn in mvc telerik grid due to condition
I have a telerik mvc grid with server bindig
I want to bind a 开发者_C百科column depending on a condition: i did columns.Bound(p => { if (Helper.Language.StartsWith("en")) { p.Patient.FirstNameEnglish; } else { p.Patient.FirstName; } })
but it gives this error "Cannot convert lambda expression to type 'string' because it is not a delegate type"
solution
if (Helper.Language.StartsWith("en")) { columns.Bound(p => p.Patient.FirstNameEnglish); } else { columns.Bound(p => p.Patient.FirstName); }
精彩评论