Change css of a field

Change css of a field

dynasoftdynasoft Posts: 422Questions: 67Answers: 3

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: I need to change the css for an editor field via jquery. If I use this it won't thrown an error:
editor2.field('Mytable.Reference').addClass('tfBoldLabel');
How can I achieve this? Thanks.

Answers

  • dynasoftdynasoft Posts: 422Questions: 67Answers: 3

    These methods do not work either:

    editor2.field('Mytable.Reference').attr("style", {'font-weight': 'bold'});

    or,

    $('#DTE_Field_Mytable.Reference').attr("style", {backgroundColor:"red"});

    or,

    var p = document.getElementById('DTE_Field_Mytable.Reference');
    p.appendChild(document.createElement('b'));
    p = null;

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    I think you will want to use field().node(). See Allan's response in this thread.

    Kevin

  • dynasoftdynasoft Posts: 422Questions: 67Answers: 3

    Many thanks for this

Sign In or Register to comment.