我有一个网格视图,其中我将 DateFormatString {0:#,#.##} 用于一列。如果列的值为 0,则它没有显示任何值你能帮我解决这个问题吗?
这是我的代码
<asp:BoundField DataField="CummPV" HeaderText="Cumm-PV" SortExpression="cummPV" DataFormatString="{0:#,#.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Bottom" HeaderStyle-HorizontalAlign="Left" HeaderStyle-VerticalAlign="Bottom"/>
<asp:BoundField DataField="cummEV" HeaderText="Cumm-EV" SortExpression="cummEV" DataFormatString="{0:#,#.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Bottom" HeaderStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="cummDelay" HeaderText="Cumm-Delay" SortExpression="cummDelay" DataFormatString="{0:#,#.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Bottom" HeaderStyle-HorizontalAlign="Left" HeaderStyle-VerticalAlign="Bottom" />
<asp:BoundField DataField="SPI1" HeaderText="SPI-1" SortExpression="SPI1" DataFormatString="{0:F3}" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Bottom" HeaderStyle-HorizontalAlign="Left" HeaderStyle-VerticalAlign="Bottom" />
<asp:BoundField DataField="SPI2" HeaderText="SPI-2" SortExpression="SPI2" DataFormatString="{0:F3}" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Bottom" HeaderStyle-HorizontalAlign="Left" HeaderStyle VerticalAlign="Bottom" />
对于 CummDelay 列,它会发生。