Programmatically clicking on a grid header

Hi,



For testing purposes I would like to be able to programmatically click on a grid header. I’ve looked through the documentation but cannot figure out a way of doing it. Is it possible to do this?



I’m using professional.



Thanks,



Phil.

If you want sort grid you can use method mygrid.sortRows(col, type, order) where
* col - index of column, by which grid need to be sorted
* type - sorting type (str,int,date), optional, by default sorting type taken from column setting
* order - sorting order (asc,des), optional, by default sorting order based on previous sorting operation

Thanks for the quick response.

As I mention, this is for testing purposes; I want to run some selenium tests that recreate clicking on headers as a real user would do. I already have a wrapper object around the dhtmlx grid onto which I have added a number of methods to help with my testing. Now I want to this add a method such as ClickHeader(). However, there doesn’t seem to be any way in the dhtmlx grid to programmatically click a header in the same way that you can, for example, check a cell.

I don’t want to call the sortRows method directly, as the user will not directly be doing this and so the test will be invalid.

However, there doesn’t seem to be any way in the dhtmlx grid to programmatically click a header in the same way that you can, for example, check a cell.
Yes, you are right. dhtmlxGrid hasn’t appropriate method.