Categories | Question details Back To List | ||
Data range filter Hi again, #1 --------------------------------- I have a grid with a data type column. I want to create a filter for this column, using a double calendar. I want to have a function myCal.rightCalendar.attachEvent("onClick", function(date){...}); and in this function I want to can create something in order to can apply a condition filter for my grid, something like myCal.leftCalendar.getFormatedDate() < columnData < myCal.rightCalendar.getFormatedDate() How can I do this? Is there any other posibility to do this? This is not working: mygrid.filterBy(3, '>'+myCal.leftCalendar.getFormatedDate()); mygrid.filterBy(3, '<'+myCal.rightCalendar.getFormatedDate(), true); #2 --------------------------------- When I'll have the data range filter working, I want to attach a div and button <div id='objId'></div><input type='button' id='bt' onClick='hide_show()' value='Show / Hide'/> in my grid header, for a specific collumn. How can I do this? #3 --------------------------------- I have this function: function hide_show() { myCal.isVisible () ? myCal.hide () : myCal.show (); } which is called when I press the input button. My problem here is the div with double calendar is shown in top of my grid, and the grid is moved down. I want the functionality to be like this: when I press pe calendar botton, the calendar to be shown right there, in the data column header, above of my grid. I hope all is clear, please give me some ideas.. Thanks in advance.. Answer posted by Alex (support) on Apr 06, 2009 10:16 Hello, >> mygrid.filterBy(3, '>'+myCal.leftCalendar.getFormatedDate()); The second parameter is filtering function: mygrid.filterBy(3,someFilter); function someFilter(...){ ... } There is the detailed article about creating custom filters. Please, take a look http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Data_filtering_search.html It can help you to resolve the issue. Answer posted by pepys on Apr 07, 2009 03:12 Thanks for your help.. BUT IT ISN'T ENOUGHT! We have a PRO dhtmlx version, and I'm very worried because I can't find in time all the information I need.. For example, I was looking very long time after seeing a method to know the column index using the column index. I didn't found this information in your documentation, but I found it in knowledge base.. I think this isn't so easy and normal.. Here I found this information: http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=5&q=6465&ssr=yes&s=column%20Index please, tell me where can I find this information in documentation, not in knowledge base.. Please, give me a link.. About my problem with data range filter, I didn't find yet an answer for the issue #3.. So I'm still waiting for you to help me.. Please.. Answer posted by Alex (support) on Apr 07, 2009 06:16 >> For example, I was looking very long time after seeing a method to know the column index using the column index. There is the list of all method which grid provides: http://dhtmlx.com/docs/products/dhtmlxGrid/doc/alpha.html the same page in grid package - dhtmlxGrid/doc/alpha.html Regarding the third problem. You can use setPosition method. It can get as parameters either left and top positions of the calendar or object. In your case the object is more suitable: myCal.setPosition(document.getElementById('bt')); Answer posted by Support on Apr 07, 2009 08:33 >> which is called when I press the input button. My problem here is the div with double calendar is shown in top of my grid, and the grid is moved down. >> I want the functionality to be like this: when I press pe calendar botton, the calendar to be shown right there, in the data If dbl-calendar was initialized inside div, the show and hide methods will affect only visibility of calendar's container. If it has not position:absolute style defined - it will not be shown over grid, but will shift all content of the page. Answer posted by Alex (support) on Apr 07, 2009 08:45 Sorry for the misleading information. Double calendar doesn't support setPosition method. It's the method of dhtmlXCalendar object. Please, define the correct style for the calendar container: it should be absolute positioned. |