Flex Grid, child grid doesn't scroll with records greater than -32.768

Posted by: gianluca.albonico on 24 February 2020, 3:08 am EST

  • Posted 24 February 2020, 3:08 am EST

    In the "data tree" example (demo Component One framework 4.0), we noticed a BUG, in practice the Flex Grid control does not manage heights greater than -32.768 on child grids.

    In the C1FlexDataTree.vb file of the DataTree.vbproj project, the UpdatePosition function when a value greater than -32.768 (example -40.000) is passed to the Location property (part highlighted in Yellow) (the property remains at -32.768 (smallInt), the repositioning of the child grid doesn't work properly.

        Private Sub UpdatePosition()

    ' sanity
    Dim parent As C1FlexDataTree = TryCast(Me.Parent, C1FlexDataTree)
    Dim parentRow As Row = TryCast(Tag, Row)
    If parent Is Nothing OrElse parentRow Is Nothing Then
    Return
    End If

    ' get cell rectangle
    Dim row As Integer = parentRow.Index
    Dim rc As Rectangle = parent.GetCellRectDisplay(row, 0)

    ' calculate child location and client size
    rc.X = rc.Right
    rc.Y = rc.Bottom
    rc.Width = Cols(Cols.Count - 1).Right
    rc.Width = Math.Max(Cols(Cols.Count - 1).Right, parent.ScrollableRectangle.Width)
    rc.Height = Rows(Rows.Count - 1).Bottom

    ' make sure child grid width doesn't extend past parent client width
    Dim maxRight As Integer = parent.ClientSize.Width - 2
    If rc.Right > maxRight Then
    rc.Width = maxRight - rc.X
    End If

    ' update size/position
    If Location <> rc.Location Then
    Location = rc.Location
    End If
    If ClientSize <> rc.Size Then
    ClientSize = rc.Size
    End If

    ' update height of container row
    parent.Rows(row + 1).Height = Height
    End Sub

  • Replied 24 February 2020, 3:02 pm EST

    Hi Gianluca,

    Please share a GIF file showing the clear steps which replicate the issue. It will help us to assist you in a better way and provide you a helpful solution.

    Regards,
    Prabhat Sharma.
  • Replied 26 February 2020, 12:10 am EST

    see att.
    Regards
    GA
  • Replied 26 February 2020, 12:10 am EST

    Error.zip
  • Replied 27 February 2020, 12:13 am EST

    Hi Prabhat
    See att 1,2 and 3
    Regards,
    GA

    C1NWind.zip
  • Replied 27 February 2020, 12:13 am EST

    2nd file
  • Replied 27 February 2020, 12:14 am EST

    3rd file
  • Replied 27 February 2020, 12:16 am EST

    3rd

    DataTree.zip
  • Replied 27 February 2020, 12:17 am EST

    C1NWind.rename_to_z01.zip
  • Replied 27 February 2020, 6:00 pm EST

    Hi Gianluca,

    The data files you attached seem to be corrupted when unzipping.
    If their size is greater than 5 MB then you can upload your data files on the given link and let me know.
    https://www.dropbox.com/request/1fhrqtBed1vzy7ILtvAX

    Regards,
    Prabhat Sharma.
  • Replied 27 February 2020, 9:17 pm EST

    Done
    Best
    GA
  • Marked as Answer

    Replied 1 March 2020, 10:09 pm EST

    Hi Gianluca,

    Sorry, but we can not replicate the issue at our end and the grid is scrolling properly Please see the attached GIF for reference and let us know if you are doing something else.

    Regards,
    Prabhat Sharma.
Need extra support?

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

Learn More

Forum Channels