Is it possible to manipulate the format on a DataGridView that is bound to a Data Source?
Posted
by Jack Johnstone
on Stack Overflow
See other posts from Stack Overflow
or by Jack Johnstone
Published on 2010-06-16T06:47:28Z
Indexed on
2010/06/16
6:52 UTC
Read the original article
Hit count: 189
I´m using SQL Server 2005 and Visual Studio 2008, C#.
In the data source (the SQL Server data table) I use the date format mm/dd/yyyy, however, in a forms overview (DataGridView) users would like to see a completely other format, with year, week number and day number of week (yyww,d). I´ve created an algorithm for this transformation, but can I populate the affected cells with yyww,d instead of mm/dd/yyyy? And in that case - how would I do it?
I guess I need to do it after the cells are populated, but before they are shown.
The generic question is - how do I manipulate the format of Data Source bound DataGridView cells.
© Stack Overflow or respective owner