IRenderer Problem

Posted by: kbj on 3 January 2019, 11:20 pm EST

    • Post Options:
    • Link

    Posted 3 January 2019, 11:20 pm EST

    After Implementing IRenderer

    Public Function IRenderer_GetPreferredSize(g As Graphics,

    size As Size,

    appearance As FarPoint.Win.Spread.Appearance,

    value As Object,

    zoomFactor As Single) As Size Implements IRenderer.GetPreferredSize

    The value object above is showing up as a string, not the actual value of a cell. It would seem that the value should be the value. Since my row headers could have a mix of text and graphics, I will need the actual value property of a cell, not the string representation.

    -Kingman

    The original thread on this problem is:

    https://www.grapecity.com/en/forums/spread-winforms/header-renderer-row-height

    and is not resolved

  • Posted 10 January 2019, 6:47 am EST

    Hi Jitender,

    This is counter-intuitive since the parameter “Value” is an object (why not string if it is always a string) and the name of the parameter is “Value” not “Text”. Why not provide the actual value object and let the programmer decide whether to convert it to something else?

    Thanks,

    -Kingman

  • Posted 10 January 2019, 2:36 pm EST

    Hi,

    This behavior is by-design. The value parameter provides the cell’s Text. Since changing this to have the cell’s Value will be a breaking change, we’re discussing with the development team [Internal Tracking ID: 268888] if a new API can be added for this issue.

    Thanks,

    Jitender

  • Posted 10 January 2019, 7:41 pm EST

    Hi Kingman,

    We agree that the value parameter should give the cell’s value. However, changing this can break other’s applications which may be relying on this behavior. The development team is considering a new API, we’ll update this thread once we hear anything from them.

    Thanks,

    Jitender

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels