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
3045
I need to change a decimal column to a URL style while keeping the format intact.
posted

When I set the cell's Style to URL, I'm losing the decimal format. It is trimming trailing zeroes. And it seems to ignore the cell's Format property. How do you change a decimal cell or column to display as a link while keeping the current formatting intact?

Parents
  • 469350
    Offline posted

    Hi,

    Using a URL Style for the column means that the column's data will be interpreted as a string, and there's no way to format a string - or at least no automatic or easy way.

    One thing you could do is hide the real column of decimal data. Keep the Format on it, but set Hidden to True on that column. Then you could add an unbound string column to the grid in it's place and set the Style of this column to URL. Then you use the InitializeRow event to copy the Text of the real, hidden, decimal cell into the URL cell.

Reply Children