dateTime column in datagrid
-
I have a table in sqlServer with some columns if dateTime values (date + time) I wrote a stored procedure that select those columns, the stored Procedure works properly. I tried to retrieve the data into dataSet and then to dataGrid. I get a very nice datagrid with the whole data, but the coulumns of datatime values show only the date. I need the time also. How can I get it? I know that there is some types of datacolumn like dataGridBoolColumn or dataGridTextBox column, but I couldn't find dataGridDateTimeColumn. Thank you;)
-
I have a table in sqlServer with some columns if dateTime values (date + time) I wrote a stored procedure that select those columns, the stored Procedure works properly. I tried to retrieve the data into dataSet and then to dataGrid. I get a very nice datagrid with the whole data, but the coulumns of datatime values show only the date. I need the time also. How can I get it? I know that there is some types of datacolumn like dataGridBoolColumn or dataGridTextBox column, but I couldn't find dataGridDateTimeColumn. Thank you;)
Use the DataFormattingExpression property. When you get your grid's properties, select your column and you should see an option. For example, you can use expressions like {0:d}, {0:f}, and so on. A full list can be found: http://www.stevex.org/dottext/articles/158.aspx[^] *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";
-
Use the DataFormattingExpression property. When you get your grid's properties, select your column and you should see an option. For example, you can use expressions like {0:d}, {0:f}, and so on. A full list can be found: http://www.stevex.org/dottext/articles/158.aspx[^] *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";