Attaching filters in the header

Hi,

I am new to dhtmlx library. I am trying to set up a small grid with filters in the header. Below is the code

dhxGrid.setHeader(“Column A, Column B, Column C”);
dhxGrid.setColTypes(“ed,ed,ed”);
dhxGrid.setColSorting(“str, str, str”);
dhxGrid.attachHeader("#select_filter, #text_filter, #text_filter");

dhxGrid.init();

The attachHeader function is adding a ‘select’ element to the first column in the header but not to the columns B and C. I see text there - ‘#text_filter’ and ‘#text_filter’.

Am I missing something?

Thank you.

Hi Vabii,

The problem is the white space after the commas (you just need to remove those two spaces).

Change:
dhxGrid.attachHeader("#select_filter, #text_filter, #text_filter");

To:
dhxGrid.attachHeader("#select_filter,#text_filter,#text_filter");

Thank you, Dreven.

It works fine now.

Regards,
Vabii