开发者

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); }

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜