C
Crash
I bet this is simple for those who have worked with the datagrid for while,
I have a parent grid and a few child grids, i want to bind the children so when i click on the parent the children update appropriately, so I thought I could do this. But the child grids appear to have the right row count, but no data is shown, just the RowError and HasErrors columns (which indicate no error) but the right number of rows are there so i know the data is behind it somewhere, its just not displaying... why not?
thanks...
private void SchedulesGrid_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(SchedulesGrid.SelectedIndex != -1)
{
DataRow parentRow = myData.Tables[0].Rows[SchedulesGrid.SelectedIndex];
//update child grids
TimesGrid.DataSource = parentRow.GetChildRows(relScheduleToTimes);
TimesGrid.DataBind();
ExclusionDatesGrid.DataSource = parentRow.GetChildRows(relScheduleToExclusionDates);
ExclusionDatesGrid.DataBind();
DayOfWeekGrid.DataSource = parentRow.GetChildRows(relScheduleToDays);
DayOfWeekGrid.DataBind();
MonthsGrid.DataSource = parentRow.GetChildRows(relScheduleToMonths);
MonthsGrid.DataBind();
DayOfMonthGrid.DataSource = parentRow.GetChildRows(relScheduleToMonthDays);
DayOfMonthGrid.DataBind();
}
I have a parent grid and a few child grids, i want to bind the children so when i click on the parent the children update appropriately, so I thought I could do this. But the child grids appear to have the right row count, but no data is shown, just the RowError and HasErrors columns (which indicate no error) but the right number of rows are there so i know the data is behind it somewhere, its just not displaying... why not?
thanks...
private void SchedulesGrid_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(SchedulesGrid.SelectedIndex != -1)
{
DataRow parentRow = myData.Tables[0].Rows[SchedulesGrid.SelectedIndex];
//update child grids
TimesGrid.DataSource = parentRow.GetChildRows(relScheduleToTimes);
TimesGrid.DataBind();
ExclusionDatesGrid.DataSource = parentRow.GetChildRows(relScheduleToExclusionDates);
ExclusionDatesGrid.DataBind();
DayOfWeekGrid.DataSource = parentRow.GetChildRows(relScheduleToDays);
DayOfWeekGrid.DataBind();
MonthsGrid.DataSource = parentRow.GetChildRows(relScheduleToMonths);
MonthsGrid.DataBind();
DayOfMonthGrid.DataSource = parentRow.GetChildRows(relScheduleToMonthDays);
DayOfMonthGrid.DataBind();
}