Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Vertical Alignment Issues Using Frozen Columns and Variable Row Height
24/03/2014
17:45
Avatar
fumanstu
Member
Members
Forum Posts: 6
Member Since:
24/03/2014
sp_UserOfflineSmall Offline

When we are using grouping AND frozen columns, if we have a row with variable row height (either set programmatically or from a cell that has line breaks), the row alignment between the frozen column and the non-frozen columns becomes incorrect for all rows from that point on.  Example code below uses the multi-select checkbox to allow this to be easily seen:

(function() {
    // Get the JSON data from the server.
    $(document).ready(function() {
       
            // We can read in JSON directly into the grid, but this provides us a way to perform
            // any transformation before we add the data to the grid?
            var txHistoryLineItems = [];
            var txHistoryLineItems1 = {
              id: 1,
              col1: 'Jake',
              col2: 'Smith',
              col3: 44,
              col4: 113,
              col5: 'Some Description'
            };
            var txHistoryLineItems2 = {
              id: 2,
              col1: 'Joan',
              col2: 'Thomas',
              col3: 44,
              col4: 113,
              col5: 'Line1\nLine2\nLine3\Line4'
            };
            var txHistoryLineItems3 = {
              id: 3,
              col1: 'John',
              col2: 'Mott',
              col3: 44,
              col4: 113,
              col5: 'Another Description'
            };
            txHistoryLineItems.push(txHistoryLineItems1);
            txHistoryLineItems.push(txHistoryLineItems2);
            txHistoryLineItems.push(txHistoryLineItems3);
           
            var $historyGrid = $("#historyGrid");
           
            $historyGrid.jqGrid({
                // Allow columns to be dragged
                sortable: false,
                data: txHistoryLineItems,
                datatype: 'local',
                colNames: ["ID", "Column 1", "Column 2", "Column 3", "Column 4", "Column 5"
                ],
                colModel: [
                    {name: "id", index: "id", hidden: true, frozen: true},
                    {name: "col1", index: "col1", frozen: true},
                    {name: "col2", index: "col2", sortable: false},
                    {name: "col3", index: "col3", draggable: false},
                    // Add a summary type property for grouping total
                    {name: "col4", index: "col4", resizable: false, summaryType:'sum', align: "right", formatter: "currency", formatoptions: {decimalPlaces: 2, prefix: '$'}},
                    {name: "col5", index: "col5"}
                ],
                grouping: true,
                groupingView : {
                    useColSpanStyle: true,
                    // Whether to show the grouping column
                    groupColumnShow : [false],
                    // Formatting for the group header {0} is the value, {1} is the count
                    groupText : ['<b>{0} ({1})</b>'],
                    groupCollapse : true,
                    // Whether to show the group summary
                    groupSummary : [true],
                    // Put summary total at header or footer area -- putting on header causes a problem.
                    // groupSummaryPos: ['footer'],
                    groupSummaryPos: ['header'],
                    // Allow summary total row to show on a grouping collapse.
                    showSummaryOnHide: true
                },
                // Add header titles to the column headers
                headertitles: true,
                // Allow multiple columns to be sorted by the user.
                multiSort: true,
                // Allow multiple rows to be selected.
                multiselect: true,
                rowNum: 500,
                height: 375,
                width: 500,
                shrinkToFit: false
            });
           
            $historyGrid.jqGrid('setFrozenColumns');

            $("#chngroup").change(function(){
                var vl = $(this).val();
                if(vl) {
                    if(vl == "clear") {
                        $historyGrid.jqGrid('groupingRemove',true);
                    } else {
                        $historyGrid.jqGrid('groupingGroupBy',vl);
                    }
                }
            });
    });
}());

25/03/2014
12:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

This is true and I can not confirm when it will be fixed.

Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

22/07/2014
07:51
Avatar
Surendra Rayapati
New Member
Members
Forum Posts: 1
Member Since:
22/07/2014
sp_UserOfflineSmall Offline

Hi,

I'm also facing the same issue.Spent hours on it.Could not get any break through.Would be very great if any finds a solution for this.

Thanks and Regards

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
76 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information