步驟:
先拖拉一個datagrid元件到設計視窗,然後在datagrid 的Properties設定Columns Properties。如下:
接著選Binding -> Options -> String Format
從圖中你會發現有很多格式可以被選使用。參考如中
{0:d} – 09/15/1975
{0:g} – 09/15/1975 7:00 AM
(0:G) - 09/15/1975 7:00:00 AM
{0:R} – Mon, 15 Sep 1975 2:00:01 PM GMT
{0:D} – Monday, September 15, 1975
{0:f} – Monday, September 15, 1975 7:00 AM
{0:F} – Monday, September 15, 1975 7:00:01 AM
{0:M} – September 15
{0:c} - $75,234.89
{0:P} – 7.523,489.33%
{0:N} – 75,234.89
{0:N4} – 75,234.8933
{0:F0} – 75234
{0:F} – 75234.89
{0:F4} – 75234.8933
{0:X6} – 00002A
{0:D5} – 00042
{0:x} – 2a
{0:X} – 2A
{0:D} – 42
{0:F0} - 42
沒有留言:
張貼留言