title: Grid in windows phone 7
body: <p>I have a grid view code below which have <strong>divided into 3 column</strong>.
  But i have a problem with the code is that.
  When <strong>multiple data</strong> is retrieved.
  All the data in the 3 column is overlapping.
  <strong>How can i modify the below code such as it will show one after another below it.</strong></p>
  
  <pre><code>           //Define grid column, size
  
              Grid schedule = new Grid();
  
              foreach (var time in timeSplit)
              {
                  timeList = time;
                  //Column 1 to hold the time of the schedule
                  ColumnDefinition scheduleTimeColumn = new ColumnDefinition();
                  GridLength timeGrid = new GridLength(110);
                  scheduleTimeColumn.Width = timeGrid;
                  schedule.ColumnDefinitions.Add(scheduleTimeColumn);
  
                  //Text block that show the time of the schedule
                  TextBlock timeTxtBlock = new TextBlock();
                  timeTxtBlock.Text = time;
                  //Set the alarm label text block properties - margin, fontsize
                  timeTxtBlock.FontSize = 28;
                  timeTxtBlock.Margin = new Thickness(0, 20, 0, 0);
                  //Set the column that will hold the time of the schedule
                  Grid.SetColumn(timeTxtBlock, 0);
  
                  schedule.Children.Add(timeTxtBlock);
              }
  
              foreach (var title in titleSplit)
              {
                  titleList = title;
  
                  //Column 2 to hold the title of the schedule
                  ColumnDefinition scheduleTitleColumn = new ColumnDefinition();
                  GridLength titleGrid = new GridLength(500);
                  scheduleTitleColumn.Width = titleGrid;
                  schedule.ColumnDefinitions.Add(scheduleTitleColumn);
  
                  //Text block that show the title of the schedule
                  TextBlock titleTxtBlock = new TextBlock();
  
                  if (title.Length &gt; 10)
                  {
                      string strTitle = title.Substring(0, 10) + "....";
                      titleTxtBlock.Text = strTitle;
                  }
                  else
                  {
                      titleTxtBlock.Text = title;
                  }
  
                  //Set the alarm label text block properties - margin, fontsize
                  titleTxtBlock.FontSize = 28;
                  titleTxtBlock.Margin = new Thickness(60, 20, 0, 0);
                  //Set the column that will hold the title of the schedule
                  Grid.SetColumn(titleTxtBlock, 1);
  
                  schedule.Children.Add(titleTxtBlock);
                  //scheduleListBox.Items.Add(schedule);
              }
  
              foreach (var category in categorySplit)
              {
                  categoryList = category;
  
                  //Column 3 to hold the image category of the schedule
                  ColumnDefinition categoryImageColumn = new ColumnDefinition();
                  GridLength catImgnGrid = new GridLength(70);
                  categoryImageColumn.Width = catImgnGrid;
                  schedule.ColumnDefinitions.Add(categoryImageColumn);
  
                  TextBlock categoryTxtBlock = new TextBlock();
                  categoryTxtBlock.Text = category;
  
                  //set the category image and its properties - margin, width, height, name, background, font size
                  Image categoryImage = new Image();
                  categoryImage.Margin = new Thickness(-50, 15, 0, 0);
                  categoryImage.Width = 50;
                  categoryImage.Height = 50;
                  if (category == "Priority")
                  {
                      categoryImage.Source = new BitmapImage(new Uri("/AlarmClock;component/Images/exclamination_mark.png", UriKind.Relative));
                  }
                  else
                      if (category == "Favourite")
                      {
                          categoryImage.Source = new BitmapImage(new Uri("/AlarmClock;component/Images/star_full.png", UriKind.Relative));
                      }
  
  
                  Grid.SetColumn(categoryImage, 2);
                  schedule.Children.Add(categoryImage);
              }
  
              scheduleListBox.Items.Add(schedule);
          }
  </code></pre>