populating combo filters with a grid initialized from HTML

I initialized the html table
mygrid = new dhtmlXGridFromTable(‘tblToGrid’);

and implemented a function to attach headers before initialization
function doBeforeInit(){
grid1.attachHeader("#text_filter,#text_filter,#combo_filter,#combo_filter");
}

Everything else works great, the combo filters are just not populated. It makes sense that this is happening because it is taking place before initialization - I am just wondering how and when can I populate the combo filters.

duplicate.
solution can be found here: viewtopic.php?f=2&t=34455