ParamQuery grid support forum

General Category => Bug Report => Topic started by: Soumya on December 20, 2014, 02:06:52 am

Title: Detail grid with tabs and first tab doesn't expand
Post by: Soumya on December 20, 2014, 02:06:52 am
Detail Grid with tabs and the first tab doesn't expand on expanding the arrow to expand. It expands when revisiting first tab after visiting another tab.

I have the code

 $detail.find(".pq-tabs").tabs().on("tabsactivate", function (evt, ui)
                    {
                        $contactsgrid.pqGrid("refreshView");
                        if (ui.newPanel.is("#contacts")) {
                            $contactsgrid.pqGrid("refresh");
                        }
                        if (ui.newPanel.is("#holdings")) {
                            $holdingsgrid.pqGrid("refresh");
                        }
                        if (ui.newPanel.is("#comments")) {
                            $commentsgrid.pqGrid("refresh");
                        }
                        if (ui.newPanel.is("#documents")) {
                            $documentsgrid.pqGrid("refresh");
                        }
                    });

but contactsGrid doesn't expand when hit the arrow to expand .
Title: Re: Detail grid with tabs and first tab doesn't expand
Post by: paramvir on December 23, 2014, 12:36:13 am
The grid can't layout properly when its ancestor is an orphan node or is hidden.

In detailModel.init callback, $detail is an orphan node and also ancestor of inner grid until it's appended to the main grid.

It can be corrected by initializing the inner grid at a later time with a setTimeout when the orphan node is appended to the main grid.

http://paramquery.com/pro/demos/detail
Title: Re: Detail grid with tabs and first tab doesn't expand
Post by: Soumya on January 13, 2015, 08:24:03 pm
Thank you