jQuery UI Widgets Forums Grid grid grouping with row details

This topic contains 4 replies, has 2 voices, and was last updated by  Hristo 5 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • grid grouping with row details #107217

    Bogdan W.
    Participant

    Say, I have “dataRow” with columns “ClientName” and “OrderId”.
    For each row I will have order details rows.
    Details may contain a lot of data (for example copy of invoice file), and for this reason I do not want to fetch them when initially populating the grid.
    Instead, I want to show them only if they are needed, i.e. when user clicks on a row.
    So it is natural to use nested grid with properly coded “initrowdetails” function.
    So far so good.
    However, end users may want to do grouping on “ClientName” column in the top grid.
    When this happens, of course I do NOT want to display “row details” column on the level of the top group,
    the top level has only “ClientName” (and “Order Count” say).
    Instead, I want “row details” column to show up only when user expands a client group WITHIN expanded group.
    Can it be done in a declarative way without creating some phony column which looks like “row details”?

    grid grouping with row details #107238

    Hristo
    Participant

    Hello Bogdan W.,

    I am not absolutely sure what you want to achieve.
    As I understand you are handling the first case and now you have trouble with the case with the grouping” feature.
    To be a new column or a row or a row details?
    Please, provide us with more details.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    grid grouping with row details #107240

    Bogdan W.
    Participant

    Howdy,
    Again, if no grouping is used then “row details” works fine.
    However, if grouping is being used then “row details” column appears right below level of the top group as a “separate grouping level”.
    Here are some sketches which may help:
    When no grouping is used the grid looks like this:
    RowDetailsColumn, ClientNameColumn, OrderIdColumn
    > Client1 Order1
    > Client1 Order2
    > Client2 Order1
    Now, when user clicks in “RowDetailsColumn”, say in the first row, the gird looks like
    RowDetailsColumn, ClientNameColumn, OrderIdColumn
    ^ Client1 Order1
    OrderDateColumn, OrderQuantityColumn, OtherColumn
    11/01/2019 100 Foo
    11/02/2019 200 Change of quantity …
    > Client1 Order2
    > Client2 Order1
    This is all good, this is what I want.
    Now let’s assume user grouped on the “ClientNameColumn”
    This is how I want grid to look like after grouping and collapsing is done:
    GroupByCollapse/Expand, ClinetNameColumnGrouped
    > Client1, OrderCount: 2
    > Client2, OrderCount:1
    This is working fine as well.
    But when user expands by clicking on the GroupByCollapse/Expand column I want to see this:
    GroupByCollapse/Expand, ClinetNameColumnGrouped
    ^ Client1, OrderCount: 2
    RowDetailsColumn, OrderIdColumn
    > Order1
    > Order2
    > Client2, OrderCount:1
    Please note position of “RowDetailsColumn” and “OrderIdColumn”.
    Originally, that is before any grouping was done, “RowDetailsColumn” and “OrderIdColumn” belonged to the same “level”.
    This is what I want to preserve.
    The point is that when I use grouping and “showrowdetails” is set to true,
    the “row details” appears at the top, right under grouping level.
    Here is the picture of what I get:
    GroupByCollapse/Expand, ClinetNameColumnGrouped
    > Client1, OrderCount:2
    > Client2, OrderCount:1
    and when the “GroupByCollapse/Expand” is clicked I get this:
    GroupByCollapse/Expand, ClinetNameColumn/GroupedColumn
    ^ Client1, OrderCount:2
    “RowDetailsColumn”
    >
    >
    > Client2, OrderCount:1

    The problem is that “RowDetailsColumn”, all of the sudden, forms its own “grouping level” and “OrderIdColumn” falls under it.
    As I said in my first email, I could fake “rowdetails” by using a hidden column.
    But I thought that maybe there is a declarative way of achieving the same.

    grid grouping with row details #107245

    Bogdan W.
    Participant

    Forget about this …
    It was my “custom” grouping.
    Sorry for the mess.

    grid grouping with row details #107257

    Hristo
    Participant

    Hello Bogdan W.,

    Thank you for the clarification.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.