Hi Guys,
I have the following code for a grid which gets fired in the Client Side, OnGridRenderComplete event.
This works very well for each day of the week, this snippet would allow only Sunday to be displayed and all other days of the week to be hidden, if today was Sunday.
The function to get the value of n is, which in the Grid Properties, Javascript Functions Declarations
How do I do the same thing for a List Control?
I have the following code for a grid which gets fired in the Client Side, OnGridRenderComplete event.
Code:
var d = new Date(); var n = d.getDay(); if (n==0){ {grid.Object}.showGridColumn('MONDAY', false); {grid.Object}.showGridColumn('MON_TIME', false); {grid.Object}.showGridColumn('TUESDAY', false); {grid.Object}.showGridColumn('TUE_TIME', false); {grid.Object}.showGridColumn('WEDNESDAY', false); {grid.Object}.showGridColumn('WED_TIME', false); {grid.Object}.showGridColumn('THURSDAY', false); {grid.Object}.showGridColumn('THU_TIME', false); {grid.Object}.showGridColumn('FRIDAY', false); {grid.Object}.showGridColumn('FRI_TIME', false); {grid.Object}.showGridColumn('SATURDAY', false); {grid.Object}.showGridColumn('SAT_TIME', false); }
The function to get the value of n is, which in the Grid Properties, Javascript Functions Declarations
Code:
function dayofweek() { var d = new Date(); if (d.getDay() == 0) { return true; } else if (d.getDay() == 1) { return true; } else if (d.getDay() == 2) { return true; } else if (d.getDay() == 3) { return true; } else if (d.getDay() == 4) { return true; } else if (d.getDay() == 5) { return true; } else if (d.getDay() == 6) { return true; } else { return false; } }
How do I do the same thing for a List Control?
Comment