Free-jqgrid Toolbar searching and Header Grouping
I'm using free-jqgrid v4.15.5 and have a problem with Toolbar searching and Header grouping.
This is sample code I am using and problem
$(document).ready(function () {
var myData = [
{ id: "1", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "2", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "3", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "4", invdate: "2007-10-04", name: "test4", note: "note4", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "5", invdate: "2007-10-31", name: "test5", note: "note5", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "6", invdate: "2007-09-06", name: "test6", note: "note6", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "7", invdate: "2007-10-04", name: "test7", note: "note7", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "8", invdate: "2007-10-03", name: "test8", note: "note8", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "9", invdate: "2007-09-01", name: "test9", note: "note9", amount: "400.00", tax: "30.00", closed: false, ship_via: "TN", total: "430.00" },
{ id: "10", invdate: "2007-09-08", name: "test10", note: "note10", amount: "500.00", tax: "30.00", closed: true, ship_via: "TN", total: "530.00" },
{ id: "11", invdate: "2007-09-08", name: "test11", note: "note11", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" },
{ id: "12", invdate: "2007-09-10", name: "test12", note: "note12", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" }
],
myGrid = $("#list");
myGrid.jqGrid({
datatype: 'local',
data: myData,
colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Closed', 'Shipped via', 'Notes'],
colModel: [
{ name: 'id', index: 'id', width: 70, align: 'center', sorttype: 'int' },
{
name: 'invdate', index: 'invdate', width: 80, align: 'center', sorttype: 'date',
formatter: 'date', formatoptions: { newformat: 'd-M-Y' }, datefmt: 'd-M-Y'
},
{ name: 'name', index: 'name', width: 70 },
{ name: 'amount', index: 'amount', width: 100, formatter: 'number', align: 'right' },
{ name: 'tax', index: 'tax', width: 70, formatter: 'number', align: 'right' },
{ name: 'total', index: 'total', width: 120, formatter: 'number', align: 'right' },
{
name: 'closed', index: 'closed', width: 110, align: 'center', formatter: 'checkbox',
edittype: 'checkbox', editoptions: { value: 'Yes:No', defaultValue: 'Yes' },
stype: 'select', searchoptions: { sopt: ['eq', 'ne'], value: ':All;true:Yes;false:No' }
},
{
name: 'ship_via', index: 'ship_via', width: 120, align: 'center', formatter: 'select',
edittype: 'select', editoptions: { value: 'FE:FedEx;TN:TNT;IN:Intim', defaultValue: 'Intime' },
stype: 'select', searchoptions: { value: ':All;FE:FedEx;TN:TNT;IN:Intim' }
},
{ name: 'note', index: 'note', width: 100, sortable: false }
],
rowNum: 10,
rowList: [5, 10, 20],
//pager: '#pager',
gridview: true,
ignoreCase: true,
rownumbers: false,
sortname: 'invdate',
viewrecords: true,
sortorder: 'desc',
//caption: 'Just simple local grid',
height: '100%'
});
myGrid.jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" });
myGrid.jqGrid('setGroupHeaders', {
useColSpanStyle: true, groupHeaders:
[
{ startColumnName: 'invdate', numberOfColumns: 5, titleText: "Group column 1" },
{ startColumnName: 'closed', numberOfColumns: 3, titleText: "Group column 2" },
]
});
});
The grid works well if there is only one Header grouping level
The problem occurs with toolbar searching when I add more Header grouping level
Is there any conflict between these two features of free-jqgrid?
And can anyone solve this problem for me? Thanks so much.
jquery jqgrid free-jqgrid
add a comment |
I'm using free-jqgrid v4.15.5 and have a problem with Toolbar searching and Header grouping.
This is sample code I am using and problem
$(document).ready(function () {
var myData = [
{ id: "1", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "2", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "3", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "4", invdate: "2007-10-04", name: "test4", note: "note4", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "5", invdate: "2007-10-31", name: "test5", note: "note5", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "6", invdate: "2007-09-06", name: "test6", note: "note6", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "7", invdate: "2007-10-04", name: "test7", note: "note7", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "8", invdate: "2007-10-03", name: "test8", note: "note8", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "9", invdate: "2007-09-01", name: "test9", note: "note9", amount: "400.00", tax: "30.00", closed: false, ship_via: "TN", total: "430.00" },
{ id: "10", invdate: "2007-09-08", name: "test10", note: "note10", amount: "500.00", tax: "30.00", closed: true, ship_via: "TN", total: "530.00" },
{ id: "11", invdate: "2007-09-08", name: "test11", note: "note11", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" },
{ id: "12", invdate: "2007-09-10", name: "test12", note: "note12", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" }
],
myGrid = $("#list");
myGrid.jqGrid({
datatype: 'local',
data: myData,
colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Closed', 'Shipped via', 'Notes'],
colModel: [
{ name: 'id', index: 'id', width: 70, align: 'center', sorttype: 'int' },
{
name: 'invdate', index: 'invdate', width: 80, align: 'center', sorttype: 'date',
formatter: 'date', formatoptions: { newformat: 'd-M-Y' }, datefmt: 'd-M-Y'
},
{ name: 'name', index: 'name', width: 70 },
{ name: 'amount', index: 'amount', width: 100, formatter: 'number', align: 'right' },
{ name: 'tax', index: 'tax', width: 70, formatter: 'number', align: 'right' },
{ name: 'total', index: 'total', width: 120, formatter: 'number', align: 'right' },
{
name: 'closed', index: 'closed', width: 110, align: 'center', formatter: 'checkbox',
edittype: 'checkbox', editoptions: { value: 'Yes:No', defaultValue: 'Yes' },
stype: 'select', searchoptions: { sopt: ['eq', 'ne'], value: ':All;true:Yes;false:No' }
},
{
name: 'ship_via', index: 'ship_via', width: 120, align: 'center', formatter: 'select',
edittype: 'select', editoptions: { value: 'FE:FedEx;TN:TNT;IN:Intim', defaultValue: 'Intime' },
stype: 'select', searchoptions: { value: ':All;FE:FedEx;TN:TNT;IN:Intim' }
},
{ name: 'note', index: 'note', width: 100, sortable: false }
],
rowNum: 10,
rowList: [5, 10, 20],
//pager: '#pager',
gridview: true,
ignoreCase: true,
rownumbers: false,
sortname: 'invdate',
viewrecords: true,
sortorder: 'desc',
//caption: 'Just simple local grid',
height: '100%'
});
myGrid.jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" });
myGrid.jqGrid('setGroupHeaders', {
useColSpanStyle: true, groupHeaders:
[
{ startColumnName: 'invdate', numberOfColumns: 5, titleText: "Group column 1" },
{ startColumnName: 'closed', numberOfColumns: 3, titleText: "Group column 2" },
]
});
});
The grid works well if there is only one Header grouping level
The problem occurs with toolbar searching when I add more Header grouping level
Is there any conflict between these two features of free-jqgrid?
And can anyone solve this problem for me? Thanks so much.
jquery jqgrid free-jqgrid
I write an example to describe this problem: demo working and demo wrong
– Tommy1209
Nov 13 '18 at 7:43
add a comment |
I'm using free-jqgrid v4.15.5 and have a problem with Toolbar searching and Header grouping.
This is sample code I am using and problem
$(document).ready(function () {
var myData = [
{ id: "1", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "2", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "3", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "4", invdate: "2007-10-04", name: "test4", note: "note4", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "5", invdate: "2007-10-31", name: "test5", note: "note5", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "6", invdate: "2007-09-06", name: "test6", note: "note6", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "7", invdate: "2007-10-04", name: "test7", note: "note7", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "8", invdate: "2007-10-03", name: "test8", note: "note8", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "9", invdate: "2007-09-01", name: "test9", note: "note9", amount: "400.00", tax: "30.00", closed: false, ship_via: "TN", total: "430.00" },
{ id: "10", invdate: "2007-09-08", name: "test10", note: "note10", amount: "500.00", tax: "30.00", closed: true, ship_via: "TN", total: "530.00" },
{ id: "11", invdate: "2007-09-08", name: "test11", note: "note11", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" },
{ id: "12", invdate: "2007-09-10", name: "test12", note: "note12", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" }
],
myGrid = $("#list");
myGrid.jqGrid({
datatype: 'local',
data: myData,
colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Closed', 'Shipped via', 'Notes'],
colModel: [
{ name: 'id', index: 'id', width: 70, align: 'center', sorttype: 'int' },
{
name: 'invdate', index: 'invdate', width: 80, align: 'center', sorttype: 'date',
formatter: 'date', formatoptions: { newformat: 'd-M-Y' }, datefmt: 'd-M-Y'
},
{ name: 'name', index: 'name', width: 70 },
{ name: 'amount', index: 'amount', width: 100, formatter: 'number', align: 'right' },
{ name: 'tax', index: 'tax', width: 70, formatter: 'number', align: 'right' },
{ name: 'total', index: 'total', width: 120, formatter: 'number', align: 'right' },
{
name: 'closed', index: 'closed', width: 110, align: 'center', formatter: 'checkbox',
edittype: 'checkbox', editoptions: { value: 'Yes:No', defaultValue: 'Yes' },
stype: 'select', searchoptions: { sopt: ['eq', 'ne'], value: ':All;true:Yes;false:No' }
},
{
name: 'ship_via', index: 'ship_via', width: 120, align: 'center', formatter: 'select',
edittype: 'select', editoptions: { value: 'FE:FedEx;TN:TNT;IN:Intim', defaultValue: 'Intime' },
stype: 'select', searchoptions: { value: ':All;FE:FedEx;TN:TNT;IN:Intim' }
},
{ name: 'note', index: 'note', width: 100, sortable: false }
],
rowNum: 10,
rowList: [5, 10, 20],
//pager: '#pager',
gridview: true,
ignoreCase: true,
rownumbers: false,
sortname: 'invdate',
viewrecords: true,
sortorder: 'desc',
//caption: 'Just simple local grid',
height: '100%'
});
myGrid.jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" });
myGrid.jqGrid('setGroupHeaders', {
useColSpanStyle: true, groupHeaders:
[
{ startColumnName: 'invdate', numberOfColumns: 5, titleText: "Group column 1" },
{ startColumnName: 'closed', numberOfColumns: 3, titleText: "Group column 2" },
]
});
});
The grid works well if there is only one Header grouping level
The problem occurs with toolbar searching when I add more Header grouping level
Is there any conflict between these two features of free-jqgrid?
And can anyone solve this problem for me? Thanks so much.
jquery jqgrid free-jqgrid
I'm using free-jqgrid v4.15.5 and have a problem with Toolbar searching and Header grouping.
This is sample code I am using and problem
$(document).ready(function () {
var myData = [
{ id: "1", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "2", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "3", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "4", invdate: "2007-10-04", name: "test4", note: "note4", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "5", invdate: "2007-10-31", name: "test5", note: "note5", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "6", invdate: "2007-09-06", name: "test6", note: "note6", amount: "400.00", tax: "30.00", closed: false, ship_via: "FE", total: "430.00" },
{ id: "7", invdate: "2007-10-04", name: "test7", note: "note7", amount: "200.00", tax: "10.00", closed: true, ship_via: "TN", total: "210.00" },
{ id: "8", invdate: "2007-10-03", name: "test8", note: "note8", amount: "300.00", tax: "20.00", closed: false, ship_via: "FE", total: "320.00" },
{ id: "9", invdate: "2007-09-01", name: "test9", note: "note9", amount: "400.00", tax: "30.00", closed: false, ship_via: "TN", total: "430.00" },
{ id: "10", invdate: "2007-09-08", name: "test10", note: "note10", amount: "500.00", tax: "30.00", closed: true, ship_via: "TN", total: "530.00" },
{ id: "11", invdate: "2007-09-08", name: "test11", note: "note11", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" },
{ id: "12", invdate: "2007-09-10", name: "test12", note: "note12", amount: "500.00", tax: "30.00", closed: false, ship_via: "FE", total: "530.00" }
],
myGrid = $("#list");
myGrid.jqGrid({
datatype: 'local',
data: myData,
colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Closed', 'Shipped via', 'Notes'],
colModel: [
{ name: 'id', index: 'id', width: 70, align: 'center', sorttype: 'int' },
{
name: 'invdate', index: 'invdate', width: 80, align: 'center', sorttype: 'date',
formatter: 'date', formatoptions: { newformat: 'd-M-Y' }, datefmt: 'd-M-Y'
},
{ name: 'name', index: 'name', width: 70 },
{ name: 'amount', index: 'amount', width: 100, formatter: 'number', align: 'right' },
{ name: 'tax', index: 'tax', width: 70, formatter: 'number', align: 'right' },
{ name: 'total', index: 'total', width: 120, formatter: 'number', align: 'right' },
{
name: 'closed', index: 'closed', width: 110, align: 'center', formatter: 'checkbox',
edittype: 'checkbox', editoptions: { value: 'Yes:No', defaultValue: 'Yes' },
stype: 'select', searchoptions: { sopt: ['eq', 'ne'], value: ':All;true:Yes;false:No' }
},
{
name: 'ship_via', index: 'ship_via', width: 120, align: 'center', formatter: 'select',
edittype: 'select', editoptions: { value: 'FE:FedEx;TN:TNT;IN:Intim', defaultValue: 'Intime' },
stype: 'select', searchoptions: { value: ':All;FE:FedEx;TN:TNT;IN:Intim' }
},
{ name: 'note', index: 'note', width: 100, sortable: false }
],
rowNum: 10,
rowList: [5, 10, 20],
//pager: '#pager',
gridview: true,
ignoreCase: true,
rownumbers: false,
sortname: 'invdate',
viewrecords: true,
sortorder: 'desc',
//caption: 'Just simple local grid',
height: '100%'
});
myGrid.jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" });
myGrid.jqGrid('setGroupHeaders', {
useColSpanStyle: true, groupHeaders:
[
{ startColumnName: 'invdate', numberOfColumns: 5, titleText: "Group column 1" },
{ startColumnName: 'closed', numberOfColumns: 3, titleText: "Group column 2" },
]
});
});
The grid works well if there is only one Header grouping level
The problem occurs with toolbar searching when I add more Header grouping level
Is there any conflict between these two features of free-jqgrid?
And can anyone solve this problem for me? Thanks so much.
jquery jqgrid free-jqgrid
jquery jqgrid free-jqgrid
asked Nov 13 '18 at 7:38
Tommy1209Tommy1209
8210
8210
I write an example to describe this problem: demo working and demo wrong
– Tommy1209
Nov 13 '18 at 7:43
add a comment |
I write an example to describe this problem: demo working and demo wrong
– Tommy1209
Nov 13 '18 at 7:43
I write an example to describe this problem: demo working and demo wrong
– Tommy1209
Nov 13 '18 at 7:43
I write an example to describe this problem: demo working and demo wrong
– Tommy1209
Nov 13 '18 at 7:43
add a comment |
1 Answer
1
active
oldest
votes
I can confirm, that the second call of setGroupHeaders
, in your combination of parameters, sets wrong values of rowspan
attribute on some columns. I can suggest you as a workaround to fix the problem manually after calling of setGroupHeaders
. In your deme it would be
$("#list_invdate,#list_closed,#list_ship_via,#list_note,#list_name").attr("rowspan", "2");
See modified demo https://plnkr.co/edit/mNtUtkUCSh3WCFEtzjdu?p=preview
Can I fix problem with setrowspan
in config?
– Tommy1209
Nov 13 '18 at 8:13
I setuseColSpanStyle = false
for both 2 group then it's ok. Is this the correct solution?
– Tommy1209
Nov 13 '18 at 8:16
@Tommy1209: Which "config" you mean? IfuseColSpanStyle: true
is usedsetGroupHeaders
calculatesrowspan
values based ongroupHeaders
option of the last callsetGroupHeaders
only. We can see, the calculation is wrong in you case. You can of case useuseColSpanStyle: false
but you will get another look of the grid headers. Is it what you want? Alternatively you can fix the values ofrowspan
like I suggested. The final look of grid headers should be correct now. In my opinion it's the best workaround, which I can suggest you.
– Oleg
Nov 13 '18 at 8:23
I understand you, Oleg. I will apply your suggestion for my problem. Thank you so much! Have a nice day, Oleg !
– Tommy1209
Nov 13 '18 at 8:30
@Tommy1209: You are welcome! Have a nice day you Tommy too.
– Oleg
Nov 13 '18 at 8:35
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53276043%2ffree-jqgrid-toolbar-searching-and-header-grouping%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I can confirm, that the second call of setGroupHeaders
, in your combination of parameters, sets wrong values of rowspan
attribute on some columns. I can suggest you as a workaround to fix the problem manually after calling of setGroupHeaders
. In your deme it would be
$("#list_invdate,#list_closed,#list_ship_via,#list_note,#list_name").attr("rowspan", "2");
See modified demo https://plnkr.co/edit/mNtUtkUCSh3WCFEtzjdu?p=preview
Can I fix problem with setrowspan
in config?
– Tommy1209
Nov 13 '18 at 8:13
I setuseColSpanStyle = false
for both 2 group then it's ok. Is this the correct solution?
– Tommy1209
Nov 13 '18 at 8:16
@Tommy1209: Which "config" you mean? IfuseColSpanStyle: true
is usedsetGroupHeaders
calculatesrowspan
values based ongroupHeaders
option of the last callsetGroupHeaders
only. We can see, the calculation is wrong in you case. You can of case useuseColSpanStyle: false
but you will get another look of the grid headers. Is it what you want? Alternatively you can fix the values ofrowspan
like I suggested. The final look of grid headers should be correct now. In my opinion it's the best workaround, which I can suggest you.
– Oleg
Nov 13 '18 at 8:23
I understand you, Oleg. I will apply your suggestion for my problem. Thank you so much! Have a nice day, Oleg !
– Tommy1209
Nov 13 '18 at 8:30
@Tommy1209: You are welcome! Have a nice day you Tommy too.
– Oleg
Nov 13 '18 at 8:35
add a comment |
I can confirm, that the second call of setGroupHeaders
, in your combination of parameters, sets wrong values of rowspan
attribute on some columns. I can suggest you as a workaround to fix the problem manually after calling of setGroupHeaders
. In your deme it would be
$("#list_invdate,#list_closed,#list_ship_via,#list_note,#list_name").attr("rowspan", "2");
See modified demo https://plnkr.co/edit/mNtUtkUCSh3WCFEtzjdu?p=preview
Can I fix problem with setrowspan
in config?
– Tommy1209
Nov 13 '18 at 8:13
I setuseColSpanStyle = false
for both 2 group then it's ok. Is this the correct solution?
– Tommy1209
Nov 13 '18 at 8:16
@Tommy1209: Which "config" you mean? IfuseColSpanStyle: true
is usedsetGroupHeaders
calculatesrowspan
values based ongroupHeaders
option of the last callsetGroupHeaders
only. We can see, the calculation is wrong in you case. You can of case useuseColSpanStyle: false
but you will get another look of the grid headers. Is it what you want? Alternatively you can fix the values ofrowspan
like I suggested. The final look of grid headers should be correct now. In my opinion it's the best workaround, which I can suggest you.
– Oleg
Nov 13 '18 at 8:23
I understand you, Oleg. I will apply your suggestion for my problem. Thank you so much! Have a nice day, Oleg !
– Tommy1209
Nov 13 '18 at 8:30
@Tommy1209: You are welcome! Have a nice day you Tommy too.
– Oleg
Nov 13 '18 at 8:35
add a comment |
I can confirm, that the second call of setGroupHeaders
, in your combination of parameters, sets wrong values of rowspan
attribute on some columns. I can suggest you as a workaround to fix the problem manually after calling of setGroupHeaders
. In your deme it would be
$("#list_invdate,#list_closed,#list_ship_via,#list_note,#list_name").attr("rowspan", "2");
See modified demo https://plnkr.co/edit/mNtUtkUCSh3WCFEtzjdu?p=preview
I can confirm, that the second call of setGroupHeaders
, in your combination of parameters, sets wrong values of rowspan
attribute on some columns. I can suggest you as a workaround to fix the problem manually after calling of setGroupHeaders
. In your deme it would be
$("#list_invdate,#list_closed,#list_ship_via,#list_note,#list_name").attr("rowspan", "2");
See modified demo https://plnkr.co/edit/mNtUtkUCSh3WCFEtzjdu?p=preview
answered Nov 13 '18 at 8:09
OlegOleg
210k9304692
210k9304692
Can I fix problem with setrowspan
in config?
– Tommy1209
Nov 13 '18 at 8:13
I setuseColSpanStyle = false
for both 2 group then it's ok. Is this the correct solution?
– Tommy1209
Nov 13 '18 at 8:16
@Tommy1209: Which "config" you mean? IfuseColSpanStyle: true
is usedsetGroupHeaders
calculatesrowspan
values based ongroupHeaders
option of the last callsetGroupHeaders
only. We can see, the calculation is wrong in you case. You can of case useuseColSpanStyle: false
but you will get another look of the grid headers. Is it what you want? Alternatively you can fix the values ofrowspan
like I suggested. The final look of grid headers should be correct now. In my opinion it's the best workaround, which I can suggest you.
– Oleg
Nov 13 '18 at 8:23
I understand you, Oleg. I will apply your suggestion for my problem. Thank you so much! Have a nice day, Oleg !
– Tommy1209
Nov 13 '18 at 8:30
@Tommy1209: You are welcome! Have a nice day you Tommy too.
– Oleg
Nov 13 '18 at 8:35
add a comment |
Can I fix problem with setrowspan
in config?
– Tommy1209
Nov 13 '18 at 8:13
I setuseColSpanStyle = false
for both 2 group then it's ok. Is this the correct solution?
– Tommy1209
Nov 13 '18 at 8:16
@Tommy1209: Which "config" you mean? IfuseColSpanStyle: true
is usedsetGroupHeaders
calculatesrowspan
values based ongroupHeaders
option of the last callsetGroupHeaders
only. We can see, the calculation is wrong in you case. You can of case useuseColSpanStyle: false
but you will get another look of the grid headers. Is it what you want? Alternatively you can fix the values ofrowspan
like I suggested. The final look of grid headers should be correct now. In my opinion it's the best workaround, which I can suggest you.
– Oleg
Nov 13 '18 at 8:23
I understand you, Oleg. I will apply your suggestion for my problem. Thank you so much! Have a nice day, Oleg !
– Tommy1209
Nov 13 '18 at 8:30
@Tommy1209: You are welcome! Have a nice day you Tommy too.
– Oleg
Nov 13 '18 at 8:35
Can I fix problem with set
rowspan
in config?– Tommy1209
Nov 13 '18 at 8:13
Can I fix problem with set
rowspan
in config?– Tommy1209
Nov 13 '18 at 8:13
I set
useColSpanStyle = false
for both 2 group then it's ok. Is this the correct solution?– Tommy1209
Nov 13 '18 at 8:16
I set
useColSpanStyle = false
for both 2 group then it's ok. Is this the correct solution?– Tommy1209
Nov 13 '18 at 8:16
@Tommy1209: Which "config" you mean? If
useColSpanStyle: true
is used setGroupHeaders
calculates rowspan
values based on groupHeaders
option of the last call setGroupHeaders
only. We can see, the calculation is wrong in you case. You can of case use useColSpanStyle: false
but you will get another look of the grid headers. Is it what you want? Alternatively you can fix the values of rowspan
like I suggested. The final look of grid headers should be correct now. In my opinion it's the best workaround, which I can suggest you.– Oleg
Nov 13 '18 at 8:23
@Tommy1209: Which "config" you mean? If
useColSpanStyle: true
is used setGroupHeaders
calculates rowspan
values based on groupHeaders
option of the last call setGroupHeaders
only. We can see, the calculation is wrong in you case. You can of case use useColSpanStyle: false
but you will get another look of the grid headers. Is it what you want? Alternatively you can fix the values of rowspan
like I suggested. The final look of grid headers should be correct now. In my opinion it's the best workaround, which I can suggest you.– Oleg
Nov 13 '18 at 8:23
I understand you, Oleg. I will apply your suggestion for my problem. Thank you so much! Have a nice day, Oleg !
– Tommy1209
Nov 13 '18 at 8:30
I understand you, Oleg. I will apply your suggestion for my problem. Thank you so much! Have a nice day, Oleg !
– Tommy1209
Nov 13 '18 at 8:30
@Tommy1209: You are welcome! Have a nice day you Tommy too.
– Oleg
Nov 13 '18 at 8:35
@Tommy1209: You are welcome! Have a nice day you Tommy too.
– Oleg
Nov 13 '18 at 8:35
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53276043%2ffree-jqgrid-toolbar-searching-and-header-grouping%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I write an example to describe this problem: demo working and demo wrong
– Tommy1209
Nov 13 '18 at 7:43