AutoSelect text field in attached grid header.

Hello,
We have a number of text fields attached as headers to a DHTMLX Grid. We are using these to filter the different columns of the grid. Currently when a user types something in the text field the grid will auto filter as the user enters in more information. This all works great, except for when the user wants to enter in another filter condition. The only way to remove the earlier entered text is to go back and delete the information one character at a time. I would like to just be able to highlight the entered text by moving the mouse over the field or double clicking the field to hightlight the text and then the user can delete the text. But none of these options seem to work. I could enter a reset button to remove the contents of the field ( field.value = “”), but I would rather not have the user click a button for reset purposes. Any help would be appreciated.

Thanks,

If you are using inbuild grid filters, you can reset filtering with following code:

grid.getFilterElement(column_index).value="" grid.filterBy(column_index,"")

hi olga,
am facing the same problem. the question is : "is there any event fired for mouse click/dblclick /move over on filter header, before we may apply any method to reset or if possible, auto select/highlight filter text? "
thanks.
regards,
sukianto

There are no special filter element related events ( there is a onHeaderClick, but it is hardly usable for filter customization)

You can try to use onFilterStart event - it will receive two arrays as incoming data - array of column ids and array of values for related columns. You can alter that data as you wish ( set default values for some column, for example ), grid will use such altered data for further filtering.