Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Setting default format for date time cells

$
0
0

Hi,

I am trying to set a default format for date time cells in the WinForms FlexGrid by using the following code:

       ' Set style render for grid
        Dim style As GridRendererOffice2007Blue = New GridRendererOffice2007Blue
        style.Highlight = Color.NavajoWhite
        fgReports.Renderer = style
        fgReports.Styles.Alternate.BackColor = Color.GhostWhite

        Dim csDate As CellStyle = fgReports.Styles.Add("date")
        csDate.DataType = Type.GetType("System.DateTime")
        csDate.Format = "MM/dd/yyyy hh:mm tt"

When the grid is rendered I am getting dates formatted as "MM/dd/yyyy". What am I doing incorrectly?


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>