jQuery UI Widgets Forums Grid How to give grid cell color in beforeLoadComplete function in JqxDataAdapter

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 7 months ago.

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

  • Akshatha Raju
    Participant

    Hi,

    I am working on Keyboard Navigation.My JSON value is from Controller is like floatvalue with stringdata (i.e){123.12_commentdata,12.90_abc,34.0_xyz,12.56_}.In beforeLoadComplete function i want to separate integer value and string value.If the separated data contain string value not equal to null then i change the color the of the that cell.Please give me the solution for this.

    beforeLoadComplete: function (records) {

    var length = records.length;

    // loop through the records and display them in a Grid.

    for (var i = 0; i <length ; i++) {

    for(var j=0;j<colsofiaDataFieldArray.length;j++){

    var temp =records[i][colsofiaDataFieldArray[j].trim()];
    var pos1=temp.indexOf(“-“);
    var subs=temp.substring(0,pos1).trim();
    valueFloat=parseFloat(subs.substring(0,6)).toFixed(2);

    f (temp.substring(pos2+1)!=””&&  temp.substring(pos2+1)!=0) {
    //here i need to change the color of the cell

    }
    records[i][colsofiaDataFieldArray[j].trim()]=valueFloat;

    }

    retrun records;

    }

     

    • This topic was modified 10 years, 7 months ago by  Akshatha Raju.
    • This topic was modified 10 years, 7 months ago by  Akshatha Raju.
    • This topic was modified 10 years, 7 months ago by  Akshatha Raju.
    • This topic was modified 10 years, 7 months ago by  Peter Stoev. Reason: Moved to Grid Forum(Reason - Posted in Wrong Forum)

    Dimitar
    Participant

    Hello Akshatha Raju,

    Cells cannot be coloured in the callback function beforeLoadComplete. To change the appearance of a cell, please use either cellsrenderer or cellclassname.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.