开发者

how to bind multiple fields to same column in ListView/GridView?

in a GridView column i nee开发者_如何学Pythond to display a string composed from a set of fields on my view model. how do i bind multiple fields to same column and how do i specify the format string to use for this column?

thanks for any help konstantin


You could create a new property on your view model to bind to. For example, lets say you have two properties, FirstName & LastName. If you wanted to display the fullname in that column, you could create the new property to bind to, like this:

public string FullName { get { return FirstName + " " + LastName; } }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜