jQWidgets Forums
Forum Replies Created
-
Author
-
October 19, 2021 at 3:38 am in reply to: Cannot render Header Color after 10th column Cannot render Header Color after 10th column #120969
Hi Yavor,
I found this is working on my scenario, tracking down the scroll bar and mouse action and apply css changes:
var scbar = $(“#grid”).jqxGrid(“hScrollBar”); // Horizontal scrollbar. Verical one is vScrollBar
scbar.jqxScrollBar(“_triggervaluechanged”, true);
scbar.on(“valueChanged”, function () {
if (_headerFontColor !== undefined && _headerFontColor !== “”) {
$(“.jqx-grid-column-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-widget-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-cell-pinned”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-cell-filter”).css(“color”, “#” + _headerFontColor + “!important”);
}if (_headerColor !== undefined && _headerColor !== “”) {
$(“.jqx-grid-column-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-widget-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-cell-pinned”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-cell-filter”).css(“background-color”, “#” + _headerColor + “!important”);
}
});$(“#grid”).mouseout(function () {
if (_headerFontColor !== undefined && _headerFontColor !== “”) {
$(“.jqx-grid-column-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-widget-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-cell-pinned”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-cell-filter”).css(“color”, “#” + _headerFontColor + “!important”);
}if (_headerColor !== undefined && _headerColor !== “”) {
$(“.jqx-grid-column-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-widget-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-cell-pinned”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-cell-filter”).css(“background-color”, “#” + _headerColor + “!important”);
}
});October 18, 2021 at 1:49 am in reply to: Cannot render Header Color after 10th column Cannot render Header Color after 10th column #120963Hi Yavor,
Thanks for the reply, this is exactly what I am experiencing, and from what I know so far, when scrolling and “mouse out” of the columns, it will took the style from css again.
Is there a way to handle these situations?
Regards,
HenryOctober 15, 2021 at 7:59 am in reply to: Cannot render Header Color after 10th column Cannot render Header Color after 10th column #120956Sorry, one more note to add, color for the header row was working, but the background color of the filter row is not….
$(“.jqx-grid-column-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-widget-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-header”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-cell-pinned”).css(“color”, “#” + _headerFontColor + “!important”);
$(“.jqx-grid-cell-filter”).css(“color”, “#” + _headerFontColor + “!important”);$(“.jqx-grid-column-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-widget-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-header”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-cell-pinned”).css(“background-color”, “#” + _headerColor + “!important”);
$(“.jqx-grid-cell-filter”).css(“background-color”, “#” + _headerColor + “!important”);October 15, 2021 at 6:23 am in reply to: Cannot render Header Color after 10th column Cannot render Header Color after 10th column #120955I found that it may due to the visibility of the columns when the grid was first loaded, not the number of columns.
If I decrease the width of the columns, more columns can handle the color we have defined programmatically, but when we starts scrolling to the right, header colors of the later columns becomes default colors.
Any grid event I should be looking at to address this problem?
Many thanks!
-
AuthorPosts