Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by JP on Feb 02, 2009 09:19
open dhtmlx forum
Sort on second header row

Hi, I have attached a combo (<select id="combo"><option...></option>...</select>) to a second header row with mygrid.attachHeader. When the combo is clicked, it triggers a sort on that column. How do I prevent this behaviour, but still allow sorting by clicking on the top row of the header?

Regards
Answer posted by Support on Feb 02, 2009 09:30
Change your code to the next

<select id="combo" onclick="(arguments[0]||event).cancelBubble=true;" > ...
Answer posted by JP on Feb 02, 2009 10:00
Thanks it works. Now another question, I'm using this combo to make a filter with mygrid.makeFilter('combo',1), but I'm getting values from other columns. I think the problem is that I also use rowspan, is there a way to fix this???

Regards

Answer posted by Support on Feb 03, 2009 02:55
>>I think the problem is that I also use rowspan
The rowspan can cause problem for filtering routine if filtering will result in hiding only part of row-spanned rows 

>> is there a way to fix this???
unfortunately there is no easy way to change existing behavior. If list of values is predefined, you can redefine collectValues method of grid, to provide custom list of options instead of auto-generated one.