Hi,
I just upgraded to the trial version of Q3 2012 and it seems like the problem is gone. However, I observe another funny behavior that intereferes with my attempts to finalize the application.
Now, I load the RadGridView, where the group headers have a TextBlock with a name and four checkboxes. Depending on the value of the field in the row business object, chekboxes may be checked or unchecked. If L1 checkbox is checked, the name textbox is green (see attached step 1.jpg, name's Donellan, Paul).
When I expand a group above (Patterson, Barbara), the grid extends down and becomes scrollable. If I scroll down to see Donellan group rows, the group header still has checkboxes correctly checked and the text is green. However, if I collapse the group for Patterson, the Donellan group is no longer green and checkboxes are unchecked, and the group header down below for Bell, Tracy has green text and checked checkboxes, which is wrong. If I reload the page, it is normal again.
So, somehow, when I scroll the grid while a group is extended, the text name and checkbox values travel to another group header. This is similar to previously seen problem with aggregate values, but now group header row controls are involved. Please help me ASAP, as I urgently need to complete this app and I'm considering buying the Q3 2012 version.
Here's the code that colors the name text block and checks the checkboxes in the group header:
private void txtGroupKey_Loaded(object sender, RoutedEventArgs e)
{
TextBlock txtGroupKey = sender as TextBlock;
GridViewGroupRow row = txtGroupKey.GetVisualParent<GridViewGroupRow>();
if (row != null && row.Group.ItemCount > 0)
{
foreach (AdminExpenseListObject obj in row.Group.Items)
{
if (obj.L1ApprovalStatusID == 5)
{
SolidColorBrush brush = new SolidColorBrush(Colors.Green);
FontWeight weight = FontWeights.Bold;
txtGroupKey.Foreground = brush;
txtGroupKey.FontWeight = weight;
break;
}
}
}
}
private void chkL1All_Loaded(object sender, RoutedEventArgs e)
{
CheckBox chk = sender as CheckBox;
GridViewGroupRow row = chk.GetVisualParent<GridViewGroupRow>();
chk.IsChecked = true;
chk.BorderThickness = new Thickness(2.0);
//Prevent using if not L1
if (!WebContext.Current.User.Roles.Contains("Level 1 Supervisor"))
{
chk.IsEnabled = false;
}
ToolTipService.SetToolTip(chk, "Withdraw L1 approval for ALL expenses");
if (row != null && row.Group.ItemCount > 0)
{
foreach (AdminExpenseListObject obj in row.Group.Items)
{
//Prevent approval of a non-submitted report
if (obj.EmployeeExpenseProcessingStatusID < 3)
{
chk.IsChecked = false;
chk.IsEnabled = false;
ToolTipService.SetToolTip(chk, "This expense report has not been submitted. Approval cannot be done.");
break;
}
else if (obj.L1ApprovalStatusID == 4)
{
chk.IsChecked = false;
ToolTipService.SetToolTip(chk, "Approve ALL expenses");
break;
}
else if (obj.L1ApprovalStatusID == 9)
{
chk.IsChecked = false;
ToolTipService.SetToolTip(chk, "Approval not required");
chk.IsEnabled = false;
break;
}
}
}
}
Thanks a lot