//for each data view to add
//{
RadGridView rgv = new RadGridView();
rgv.CanUserFreezeColumns = true;
rgv.CanUserResizeColumns = true;
rgv.IsReadOnly = true;
//rgv.Sorting (how do I set this to my handler?)
rgv.ShowColumnFooters = true;
rgv.AutoExpandGroups = false;
//rgv.GroupRowStyle (how do I set this to "{StaticResource MyCustomGroupRowStyle}"?)
rgv.ShowGroupFooters = true;
rgv.CanUserSelect = true;
rgv.SelectionMode = System.Windows.Controls.SelectionMode.Extended;
LayoutRoot.Children.Add(rgv);
RadDataPager rdp = new RadDataPager();
rdp.PageSize = 20;
rdp.DisplayMode = PagerDisplayModes.All;
rdp.AutoEllipsisMode = AutoEllipsisModes.Both;
rdp.NumericButtonCount = 10;
rdp.IsTotalItemCountFixed = true;
rdp.Source = rgv.Items;
LayoutRoot.Children.Add(rdp);
rgv = AddColumns(rgv);
rgv.ItemsSource = _datalist;
//}
Even with only 1 view/pager that is showing the correct data, my elements are overlapping. First, my grid view totally overlaps my xaml export StackPanel element (effectively hiding it). Then, my pager overlaps my grid (in the middle of the grid). My first question is: why is overlapping occurring instead of one element appearing after the other?
The second question is: how do I add Interaction Behaviors in this code for my grid view? Specifically, this one that telerik told me to use to show that the grid is still loading:
<i:Interaction.Behaviors>
<local:EmptyDataTemplateBehavior>
<local:EmptyDataTemplateBehavior.EmptyDataTemplate>
<DataTemplate>
<TextBlock Text="Please wait while report is loading..." Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding MessageVisibility}" />
</DataTemplate>
</local:EmptyDataTemplateBehavior.EmptyDataTemplate>
</local:EmptyDataTemplateBehavior>
</i:Interaction.Behaviors>
Finally, how do I programmatically set the ShowHeaderAggregate property (this was being done in the xaml) to False in each grid view?