Author Topic: Problem with flex resizing main grid that contains a detail grid  (Read 2105 times)

MEngelbyPQ

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Plunker link: https://plnkr.co/edit/Ciykx8LuUs9TH0Uzq1C7?p=preview

This is what I am attempting:
  • Grid Title to be completely shown when resizing grid.  Currently, because the cell content widths are too small, the grid title is clipped.
  • When a detail cell is clicked, resize the main grid to show all of the detail grid, Currently, the detail grid cell contents widths are larger than the main grid, thus clipping the detail grid.
  • The row height should be the height of the detail grid.  Not sure why this is happening, in my other code base the containing row sizes to the same height as the detail grid.
For point 2, the complete function is an attempt to figure out the widths and resize the main grid.   The logic in that function would work better in an event that fired after the row is expanded.  There is an event 'beforeRowExpand' but that won't work for what I am trying to do.  I am using PQpro 4.0.2 but as you can see, the latest version shows the same behavior.

Is there a way to programmatically resize the main grid width so all the detail grid can be seen?

-Mike

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6264
    • View Profile
Re: Problem with flex resizing main grid that contains a detail grid
« Reply #1 on: May 11, 2018, 05:33:55 pm »
1. That is understandable as flex layout doesn't consider title of grid while computing width of grid. Flex width makes the grid width equal to sum total of the column widths only.

2. complete event is fine but again assumption about flex layout is wrong. Flex layout doesn't consider the width of detail children.
If width of detail child is more than that of parent grid, then it can be viewed by adding a horizontal scrollbar to detail child view.

Code: [Select]
[id^='pq-detail']{
  overflow-x: auto !important;
}

3. javascript-detect-element-resize needs to be added to the document.

https://plnkr.co/edit/jzZMS3gSmKGNPwxzr7FD?p=preview

MEngelbyPQ

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Problem with flex resizing main grid that contains a detail grid
« Reply #2 on: May 12, 2018, 01:15:53 am »
Thanks for the insight ParamQuery.

While not exactly what I was hoping for, your answers do show that I am trying to use the flex resizing feature not as designed.
I'll need to rethink what I am trying to accomplish and adjust as needed.