I am utterly confused by my inability to format numbers in a VirtualGrid to only show three decimals. I can find no access to a "Columns" property, and when using the CellFormatting event, I am unable to utilize CellElement.FormatString (VS tells me the set accessor is inaccessible in that context)...
How can I prevent numbers from showing as 1.23456489456987654 and instead show 1.235 (for instance), without converting the underlying data itself?
Any help appreciated, because I am convinced this must be a trivial operation, which got me to search for hours - to no avail.
For reference, here is what I was trying with the CellFormatting event that will not compile for me:
private void rvgData_CellFormatting(object sender, VirtualGridCellElementEventArgs e)
if (e.CellElement.RowIndex > -1)
if (e.CellElement.ColumnIndex > 1)
/* This yields: Error CS0272 The property or indexer
'VirtualGridCellElement.FormatString' cannot be used in this context
because the set accessor is inaccessible */
e.CellElement.FormatString = "...";
And there's for something else that's frustrating: your code editor on this site does not seem to work on Firefox/Mac...