StephleHardi
2022-03-20T07:58:37Z
Hello
With IGrid (.Net 4)
in a column (or cells) with a type or style "DateTime" how to write date without the time part

it works if we write MyGrid.CellValues(5, 0) = mydate.ToShortDateString but the sorting is no longer correct

Thank you
Igor/10Tec
2022-03-21T07:06:06Z
To have correct sorting, store your DateTime values 'as is' in cells but format these cell values on the screen. Here is an example for a whole column:

iGrid1.Cols[0].CellStyle.FormatString = "{0:d}";
StephleHardi
2022-03-21T08:50:01Z
Thank you for your quick response.

I am testing the trial version and this product seems very good to me

I will buy it today

Can you tell me where I could find the different kinds of ".FormatString"

Thanks very much

Igor/10Tec
2022-03-22T09:27:41Z
We use the .NET format strings. See the Microsoft documentation. For example, you start from this topic:

https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings