Hi,
I have difficulty to format my string with UltraWinGrid.UltraCombo
My column was type of "String"
Data is "405040" and I want to look like "40-5040" I want to add "-" after 2 digits.
I try .bands(0).Columns("Code").Format = "!!-!!!!" is don't work.
thank.
Francois.
Hello GIPFG,
Please refer to the following link below to manage custom filters.
decimal value = 405040;Console.WriteLine(value.ToString("##-####"));
http://msdn.microsoft.com/en-us/library/0c899ak8.aspx
Hi Michael,
I know this fonction.
But I fill my datasource with list of object and one column is a string value not decimal or integer.
I want to put mask to this column to add "-" after the second caracter.
Hi Francois,
The Format property works by calling the ToString method on the value and passing in the format. Since the String data type in Dotnet does not support any formatting, setting the format in this case will have no effect.
One way you could deal with this is to have your data source return numeric values instead of string. Then you could format them using the Format property on the column.
If you can't do that, then another option would be to hide the real bound column in the Combo and add an unbound column. Then you would use the InitializeRow event to populate the unbound column by taking the text of the bound column and modifying it however you want.
Hi Mike,
Thank for the answer.
I will make a second property on my objet and return the string format and use this second column for .DisplayMember property.
I think this is my easy way.
Thank again.