it is not possible to set the FormattedValue of an entry in a calculated DataView column

20 views
Skip to first unread message

Sam Halliday

unread,
Dec 28, 2011, 10:50:04 AM12/28/11
to google-visua...@googlegroups.com
Dear all,

It was previously suggested to me to use a calculated column in a DataView to work-around a rendering bug that I was experiencing.

I am essentially doing something like http://jsfiddle.net/smjVd/4/ to add two columns together. However, this means that it is not possible to set the "FormattedValue" for the new combined column, which is essential for me.

I am trying to implement a workaround whereby I set a load of 'role' columns with tooltip values, but that seems to be an excessive detour in order to specify the formatted values. Is there a simpler way, or can this be addressed in an update to the API?

asgallant

unread,
Dec 28, 2011, 11:29:43 AM12/28/11
to google-visua...@googlegroups.com
You can work around this by converting the view into another DataTable object and then formatting the new DataTable.  This loses the advantages of the DataView (namely, the view always sees the current state of the underlying table, so any changes are automatically reflected in the view; and they also have low memory requirements compared to DataTables [important if your data set is very large]) and adds another step to a cumbersome process, but it works: http://jsfiddle.net/smjVd/5/

Sam Halliday

unread,
Dec 28, 2011, 11:35:30 AM12/28/11
to google-visua...@googlegroups.com
Thanks asgallant. I had thought of that, but ... yuck! I will probably end up having to do this. It does indeed defeat the point of my sortie into the world of DataViews.

Reply all
Reply to author
Forward
0 new messages