1 Reply Latest reply on Dec 12, 2007 11:15 AM by ntsiii

    Advanced Data Grid

    ChiefRocka00 Level 1
      I am making a calendar display and want to show all events for a given day in a datagrid cell. I have included a sample of my XML and my data grid code. Anyone know how I can show multiple records in one data grid cell?

      <fullCalendar>
      <weekData>
      <Sun>
      <dayOfMonth>December 9</dayOfMonth>
      <calendarDate>2007-12-09</calendarDate>
      <eventTime/>
      <eventTitle/>
      <errorInfo/>
      </Sun>
      <Mon>
      <dayOfMonth>10</dayOfMonth>
      <calendarDate>2007-12-10</calendarDate>
      <eventTime/>
      <eventTitle/>
      <errorInfo/>
      </Mon>
      <Tue>
      <dayOfMonth>11</dayOfMonth>
      <calendarDate>2007-12-11</calendarDate>
      <eventTime/>
      <eventTitle/>
      <errorInfo/>
      </Tue>
      <Wed>
      <dayOfMonth>12</dayOfMonth>
      <calendarDate>2007-12-12</calendarDate>
      <eventTime>18:45:00</eventTime>
      <eventTitle>6:45 Boys Program</eventTitle>
      <errorInfo/>
      </Wed>
      <Wed>
      <dayOfMonth>12</dayOfMonth>
      <calendarDate>2007-12-12</calendarDate>
      <eventTime/>
      <eventTitle>6:45 Girls Program</eventTitle>
      <errorInfo/>
      </Wed>
      </weekData>
      </fullCalendar>

      <mx:DataGrid id="dgCalendar"
      dataProvider="{calendarArray}"
      height="500"
      width="965"
      rowHeight="108"
      verticalGridLines="true"
      sortableColumns="false"
      paddingTop="0">
      <mx:columns>
      <mx:DataGridColumn headerText="Sunday" width="145" textAlign="center">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox verticalGap="1">
      <mx:Label text="{data.Sun.dayOfMonth}" textAlign="right" paddingRight="3" width="100%" fontWeight="bold" />
      <mx:Label text="{data.Sun.eventTitle}" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="Monday" width="145" textAlign="center">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox verticalGap="1">
      <mx:Label text="{data.Mon.dayOfMonth}" textAlign="right" paddingRight="3" width="100%" fontWeight="bold" />
      <mx:Label text="{data.Mon.eventTitle}" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="Tuesday" width="145" textAlign="center">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox verticalGap="1">
      <mx:Label text="{data.Tue.dayOfMonth}" textAlign="right" paddingRight="3" width="100%" fontWeight="bold" />
      <mx:Label text="{data.Tue.eventTitle}" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="Wednesday" width="145" textAlign="center">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox verticalGap="1">
      <mx:Label text="{data.Wed.dayOfMonth}" textAlign="right" paddingRight="3" width="100%" fontWeight="bold" />
      <mx:Label text="{data.Wed.eventTitle}" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="Thursday" width="145" textAlign="center">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox verticalGap="1">
      <mx:Label text="{data.Thu.dayOfMonth}" textAlign="right" paddingRight="3" width="100%" fontWeight="bold" />
      <mx:Label text="{data.Thu.eventTitle}" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="Friday" width="145" textAlign="center">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox verticalGap="1">
      <mx:Label text="{data.Fri.dayOfMonth}" textAlign="right" paddingRight="3" width="100%" fontWeight="bold" />
      <mx:Label text="{data.Fri.eventTitle}" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="Saturday" width="145" textAlign="center">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox verticalGap="1">
      <mx:Label text="{data.Sat.dayOfMonth}" textAlign="right" paddingRight="3" width="100%" fontWeight="bold" />
      <mx:Label text="{data.Sat.eventTitle}" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      </mx:columns>
      </mx:DataGrid>