Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Apr 15, 2008 07:44
open dhtmlx forum
Grid Cont.....

I have a grid (Version 1.5) in which some of the columns are of type "Grid". Iam trying to enable the textbox filters to the subgrids and i have the following issues:

When i type some text in the textbox inside the subgrid it takes me to the row which matches the text but when i try to click on the row to make selection nothing happens and the cell editor doesnot close.

The text I type in the searchbox of the subgrid is being preserved and the same text appears in the textbox when I open another cell.






Answer posted by Support on Apr 15, 2008 08:02
If you mean scheme when one grid used as editor for another grid - it is normal, because all cells in column use the same grid component, so it not changes state between activations|deactivations.
Answer posted on Apr 15, 2008 08:17

I undestand that its the same grid for all the cells in the column but is there a way to clear the textbox when the cell editor closes??

When i type some text in the textbox inside the subgrid it takes me to the row which matches the text but when i try to click on the row to make selection nothing happens and the cell editor doesnot close. How can i fix this?

And also can i have the mouse focus in the textbox filter in the subgrid when the cell initially opens??

Answer posted by Support on Apr 15, 2008 08:58
>>I undestand that its the same grid for all the cells in the column but is there a way to clear the textbox when the cell editor closes??

You can reffer to the subgrid as
    var sub = grid._sub_grids[index]; //index - index of column
after that you can use any API calls against linked grid.
As far as I can undestood you are using #text_search element inside header, there is no way to change its state by API, but you can try to locate it directly through DOM

    sub.hdr.rows[SOME].cells[SOME].firstChild.firstChild.value="";

>>but when i try to click on the row to make selection nothing happens and the cell editor doesnot close
Problem confirmed and fixed  - please use attached js file instead of original one.

>>And also can i have the mouse focus in the textbox filter in the subgrid when the cell initially opens??
You can use onCellEdit event to catch moment when sugrid shown|hidden and use direct DOM manipulation as described above to focus input element.
Attachments (1)