How to change color for datatable header text when clicking on menuItem

edited July 2017 in Technical questions

Hi webix

How to change color for datatable header text when clicking on menu item as dynamicaly.
.If we click datatable header the menuitems will be display.
.In menu if we click menuitem the datatable  header text color want to be changed.

Please find the code below

on:{
  onMenuItemClick:function(id, e, node){
    if (this.getMenuItem(id)){
      var gridID = this.getParentView().config.gridId;
      var dataType = $$(gridID).getColumnConfig(this.config.headerId).sorttype;
      dataType = dataType?dataType:"string";
      switch (this.getMenuItem(id).value){
        case "Ascending":
          $$(gridID).sort(this.config.headerId, "asc", dataType);
          $$(gridID).markSorting(this.config.headerId, "asc");
          break;
      }
    }
  }
}

Thanks in advance

Regards
Deepak

Comments

  • $$(gridId).getColumnConfig(this.getTopParentView().config.column).header[0].css="italicText";
    $$(gridId).refreshColumns();

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion