Hi all,
I have a DataGridView control and its DataSource property is bound to a table received from an MS-SQL query. All of the data types in the bound table are smalldatetime.
DataGridView
DataSource
After I receive the table, I want to display the data as "dd-mm-yyyy" rather than "mm-dd-yyyy".
Any suggestions?
Thanks.
You can try this: dataGridView1.Columns[0].DefaultCellStyle.Format = "dd/MM/yyyy"; Hope this will help you.
thx 4 ur help guys!
eventually i used:
c[column_index].DefaultCellStyle.Format = "dd-MM-yyyy";
for each column i wanted to format.
thx again!!!
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)