Here is my situation.
1. Using a RadGrid.
2. Using a EditForm template.
3. In the edit form template i have a RadCalendar and a Listbox.
4. In the list box i have a series of dates that i want to use to select dates in the RadCalendar.
5. I want to use the RadCalendar to select dates.. and have it put into the listbox.
6. I can see the RadCalendar in Javascript.. i can add/remove elements etc but I am having a hell of a time getting the javascript to see the listbox (so that i can update it).
Here is the code so far (work in progress)
function getElements(calendarInstance, args) {
1 var grid = $get('<%= grdElectives.ClientID %>');
2 alert(
'gridElectives found: ' + grid);
3 var dates = calendarInstance.get_selectedDates();
4 var i = 0;
5 for (i = 0; i < dates.length; i++) {
6 alert(dates[i]);
7 }
8 var todaysDate = new Date();
9 var todayTriplet = [todaysDate.getFullYear(), todaysDate.getMonth() + 1, todaysDate.getDate()];
10 var tomorrowTriplet = [todaysDate.getFullYear(), todaysDate.getMonth() + 1, todaysDate.getDate() + 1];
11 var selectedDates = [todayTriplet, tomorrowTriplet];
12 calendarInstance.selectDates(selectedDates,
true);
}
Line 1 gets the grid instance correctly (as line 2 is showing Grid Electives found: OBJECT in the alert box)
But i need to find the listbox control that is within that grid (the name of the listbox is lstDates)
I know that once i have an instance of the listbox i can read/write to it.... which is what i need to do despirately
Cannot for the life of me get this to work.
Any help is appreciated.