开发者

Default value as display value c#

开发者 https://www.devze.com 2023-02-05 10:47 出处:网络
I am getting products in JSON format and I want that my default product have a开发者_如何学Go MARK that I know that is default:

I am getting products in JSON format and I want that my default product have a开发者_如何学Go MARK that I know that is default:

DisplayValue = "MARK";

How can I do it?


In javascript you can add a property to any object just by assigning a value:

var products = [{ Name: 'A' }, { Name: 'B' }, { Name: 'C' }];

$(products).each(function() {
    this.DisplayValue = "MARK" + this.Name;
}
0

精彩评论

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