Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
444
How to specify the grid to display both date and time instead of just date?
posted

I add columns and rows in the grid runtime. Even if my column is of type DateTime and the value has both date and time, the grid displays only date, not time. Is there a property with which I can specify the grid to display both date and time if the column is a date? How do I do that?

Thanks,

Sindhu 

Parents
No Data
Reply
  • 444
    posted

    I guess I figured it out myself.  grid1.DisplayLayout.Bands(0).Columns("Col1").Format = "mm/dd/yy hh:mm:ss"  

     But the steps I follow are like

    - Add data(rows and Columns) to a data table 

    - grid1.DataSource = m_pDataTable

    Now I cannot set the format before addding data to grid. And If I set the column format after the datasource statement, it doesnt effect. Don't know how to move further?? 

     Thanks,

    Sindhu

Children