Kendo-Grid: two field in one column
-
21-12-2019 - |
Question
I havetwo fields in my class First Name & Last Name. Currently I am displaying as two column in Kendo-Grid. But now I want it to be display like follow:
Name
-------------
Parker, Peter //i.e. LastName,FirstName
I don't know how to do. Pls help.
Solution
(Assuming you're using asp.net MVC server-side)
Simply add a new property to your model:
public string CombinedNames {
get { return Lastname + ", " + FirstName; }
}
And use that property as a column in Kendo Grid.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow