Setting filters in Java server code

I’d like to set filters in Java code. I tried within , but it had no effect on the grid - no filter show up. Here is the code:

<head><beforeInit><call command='attachHeader'><param>#text_filter</param><param>#text_filter</param></beforeInit><afterInit><call command='setColumnId'><param>0</param><param>Yes</param></call></afterInit><column width='150' align='left' sort='int' type='ro' color='#F0F0F0'>Project Key</column><column width='150' align='left' sort='int' type='ro' color='#F0F0F0'>Project Name</column></head>

I wonder if there is a way to code filters in Java server code? Thanks!

Please make sure if you attached dhtmlxgrid_filter.js file to your page

That’s probably not going to help because when I do “attachHeader” on the grid from javascript, like this:

mygrid.attachHeader(...)

it works perfectly.