jQWidgets Forums

jQuery UI Widgets Forums Grid Custom Theme cancels cellclass formatting on Grid

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • tomintex
    Participant

    1. Added some css elements in <style> section on page …
    <style type=”text/css”>
    .bgnd-grey
    {
    background-color: #e0e0e0;
    }
    .bgnd-white
    {
    background-color: white;
    }
    .bgnd-yellow
    {
    background-color: #fff59d;
    }
    .bgnd-red
    {
    background-color: #cc0000;
    color: white;
    }

    2. then implemented several cellclassname functions using these items …

    var cellclassname = function (row, column, value, data) {
    var startDate = new Date();
    startDate = data.DateCreated;
    if (dateValue === ExtractDate(startDate)) {
    return ‘bgnd-grey’;
    }
    }

    and

    var hr = new Date().getHours();
    var cellclassname7 = function (row, column, value, data) {
    if (data[‘ExpectedCount’] !== data[datafield7]) {
    return ‘bgnd-red’;
    }
    }

    3. All worked perfectly until I added a custom theme to the mix – Grids reflected theme changes to header and footer backgrounds – but all special formatting via the cellclassname functions stopped

    Any idea why this would occur?

    Thanks
    TomA


    Hristo
    Participant

    Hello tomintex,

    I would suggest you try to add the class for the cells and after that your additional classes.
    Please, take a look at this example:

    .jqx-grid-cell-custom.bgnd-grey {
    	background-color: #e0e0e0;
    }

    In the example above the name of the custom created theme is custom.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    tomintex
    Participant

    Thanks, that fixed the issue!!!

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

You must be logged in to reply to this topic.