Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1265
Column Display Format not working
posted

I set the format of several columns in the initialize layout event of the grid: 

For Each MyColumn As UltraGridColumn In e.Layout.Bands(0).Columns
If IsNumeric(MyColumn.Key) Then
MyColumn.Format = "f2"
End If
Next

However, when I run the application, the formatting is not displayed.  I added a new row to the grid that would display the column format to make sure that it was not lost, and every one still holds the "f2" format.  I also applied the format to the summary row and it worked there.

Here is a photo to demonstrate:

Parents
  • 469350
    Verified Answer
    Offline posted

     What is the data type of the column? All the Format property of the column does it call ToString on the Value of a cell and pass in the format you specified. So it looks to me like whatever data type you are using for the columns here, it doesn't support a format of "f2". 

Reply Children