如何在网格视图中显示NULL值?我正在使用Kendo网格视图,如果我没有加入某个外键的NULL值(例如:_UnitKey),它的效果很好。谢谢你们
以下是从本地服务器获取的odata文件的一部分:
"_Key":11000002100000003,"SAPStorageLocation":"Kopenhagen","_UnitKey":81200000001,""_MaterialKey":83000000004,"UnitOfMeasure":"hl","Status":0,"StartTime":"2015-02-03T11:56:05.39+01:00","Quantity":17.926000000,"ProductionResourceOrLine":"ProductionResourceOrLine","OrderType":"OrderType 20","MaterialLotID":"MaterialLotID 20","ID":"ID 20","CreationTime":"2015-02-03T11:56:05.39+01:00","Comment":"123456789012345678901234567890123456789
我想显示例如_UnitKey不是数字,如果它是null ..但它没有显示,我收到一条消息:"无法读取属性' _UnitKey' of null"
答案 0 :(得分:1)
你可以添加模型,例如:public DateTime? DisposalDate {get;组; }