Hi guys,
i have a grid with some filtering options specified. I also have created a grid footer with a couple of customised search fields (selecting between two dates for instance). Each of these currently works independently, howeverI want to be able to use them in unison, i.e. select to display a set of results between two dates and then filter tha from the filter bar on the grid, but I can’t figure out how to do this?
heres the grid
crewPrevGrid = crewTabbar.cells(“crewprev”).attachGrid();
crewPrevGrid.setImagePath(‘codebase/imgs/’);
crewPrevGrid.setHeader(‘Date,Client,Job,Callout,Task,Location,Start,Hrs,Rate,Cost,Status,Late,View’);
crewPrevGrid.attachFooter(“Totals,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,
crewPrevGrid.attachHeader(“Filter,#select_filter,#select_filter,#select_filter,#select_filter, , , , , ,#select_filter, ,#select_filter”);
crewPrevGrid.attachFooter(“Filter dates from<input type=‘text’ id=‘dateStartFilt’ class=‘headertxt’ onchange=“dateFilter();”>to,#cspan,#cspan,#cspan,#cspan,#cspan,<a href=”#" onClick=“crewReport()”>
the grid is loaded like this
crewPrevGrid.clearAndLoad(“crewdetail.php?action=crewprevious&CrewID=” + crewid, postCrewLoad);
On a date change in the footer I call this…
function dateFilter()
{
crewPrevGrid.clearAndLoad(“crewdetail.php?action=crewprevious&CrewID=” + (CrewTree.getSelectedItemId()).substr(2) + “&datefrom=” + $(‘dateStartFilt’).value + “&dateto=” + $(‘dateEndFilt’).value, postCrewLoad);
}
when a filter on the grid is selected i automatically refereshes the grid but does not take into account the additional filters in the footer!
thanks
Cyril