This project is read-only.

Grid WebPart: What is possible with the DynamicColumn?

Nov 26, 2011 at 7:30 PM


is there a way to do some advanced formatting with the DynamicColumn, e.g. let's say I have the Filesize column, which returns the file size in bytes like "1236565".

Now I want to display it in KBytes, e.g. I would have to divide it by 1024 and then append the string "KB".





Dec 8, 2011 at 8:16 PM

Hi Oliver,

The dynamic column is setup to simply do a string replace. Calculations during rendering are not supported. In order to accomplish what you want, I'd suggest defining a new column type which inherits from the abstract class PS.WebParts.Rollup.GridViewWebPart.FormattedColumn and overrides the GetFormatedString method. I'd be more than happy to work with you to come up with a generic solution for this use case that can be included in future releases.