DataSet does not support System.Nullable<> in Export

前端 未结 4 824
暖寄归人
暖寄归人 2021-01-31 01:34

I was trying to generate a Report using Export to Excell, PDF, TextFile. Well I am doing this in MVC. I have a class which I named SPBatch (which is the exact name of my Stored

4条回答
  •  后悔当初
    2021-01-31 02:10

    try with

    dt.Columns.Add(pi.Name, Nullable.GetUnderlyingType(
                pi.PropertyType) ?? pi.PropertyType);
    

提交回复
热议问题