This question is locked. New answers and comments are not allowed.
I am creating columns and binding the grid datasource in code behind when the form is loaded. I am displaying a progress bar in the middle of the screen while the grid is loading. However the progress bar freezes a second or two after being displayed and I am thinking it is due to UI Thread issues from the Constant grid UI updates taking place during the data load and column creation.
How can i get the progress bar to work properly while the grid is being created and populated with data?
How can i get the progress bar to work properly while the grid is being created and populated with data?
7 Answers, 1 is accepted
0
Zinnia
Top achievements
Rank 1
answered on 01 Dec 2010, 06:39 AM
I am also getting this, it is a major problem. Any solutions?
0
Hi,
Vlad
the Telerik team
The progress can be seen only if you do something outside of the UI thread - If you have heave UI you may get such problems. How many columns/ rows you have in this grid? Can you post the grid version as well?
Greetings,Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Timothy
Top achievements
Rank 1
answered on 01 Dec 2010, 10:22 PM
The grid is declared in XAML, but the datasource and columns are declared in code behind. There is between 5 - 25 columns depending no backend data. Regardless of the # of columns I declare( I have tested thisd) the progress bar is frozen during WCF RIA services data load. I have also tried the datagrid .IsBusy (Frozen), I have tried deprate progress bars and busy indicators and all are frozen during the data load (while the grid is coming up on screen).
Version of GridView DLL is: 2010.3.1110.1040
The code behind for the grid population is below,
The Grid is decalred in XAML as below,
The WCF RIA Datasource is declared in code bahind with Autoload set to False as below,
My main question is what is the best way to show a busy indicator in this circumstance. I have found that if I set the data source to "AutoLoad=False" in XAML that I do not get frozen indicator but I when I do this I cannot figure out when to kill the busy indicator because "Onloaded" and "Loaded events never get called in this instance.
I played with using a timer but it is not acceptable solution.
Please help.
Thanks,
Tim
Version of GridView DLL is: 2010.3.1110.1040
The code behind for the grid population is below,
Private Sub CreateEventGrid() Dim Evname As String = NavigationContext.QueryString("Event") Dim context = New DomainService1 context = TryCast(Me.EventAdminDomainDataSource.DomainContext, DomainService1) context.Load(Of EventAdmin)(context.GetEventAdminsQuery()) For Each EventAdmin In context.EventAdmins If Evname = "Event1" Then context = TryCast(Me.Event1DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event1s context.Load(Of Event1)(context.GetEvent1Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event1 ElseIf Evname = "Event2" Then context = TryCast(Me.Event2DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event2s context.Load(Of Event2)(context.GetEvent2Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event2 ElseIf Evname = "Event3" Then context = TryCast(Me.Event3DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event3s context.Load(Of Event3)(context.GetEvent3Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event3 ElseIf Evname = "Event4" Then context = TryCast(Me.Event4DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event4s context.Load(Of Event4)(context.GetEvent4Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event4 ElseIf Evname = "Event5" Then context = TryCast(Me.Event5DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event5s context.Load(Of Event5)(context.GetEvent5Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event5 ElseIf Evname = "Event6" Then context = TryCast(Me.Event6DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event6s context.Load(Of Event6)(context.GetEvent6Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event6 ElseIf Evname = "Event7" Then context = TryCast(Me.Event7DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event7s context.Load(Of Event7)(context.GetEvent7Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event7 ElseIf Evname = "Event8" Then context = TryCast(Me.Event8DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event8s context.Load(Of Event8)(context.GetEvent8Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event8 ElseIf Evname = "Event9" Then context = TryCast(Me.Event9DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event9s context.Load(Of Event9)(context.GetEvent9Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event9 ElseIf Evname = "Event10" Then context = TryCast(Me.Event10DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event10s context.Load(Of Event10)(context.GetEvent10Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event10 ElseIf Evname = "Event11" Then context = TryCast(Me.Event11DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event11s context.Load(Of Event11)(context.GetEvent11Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event11 ElseIf Evname = "Event12" Then context = TryCast(Me.Event12DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event12s context.Load(Of Event12)(context.GetEvent12Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event12 ElseIf Evname = "Event13" Then context = TryCast(Me.Event13DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event13s context.Load(Of Event13)(context.GetEvent13Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event13 ElseIf Evname = "Event14" Then context = TryCast(Me.Event14DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event14s context.Load(Of Event14)(context.GetEvent14Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event14 ElseIf Evname = "Event15" Then context = TryCast(Me.Event15DomainDataSource.DomainContext, DomainService1) CheckListItemssDataGrid.ItemsSource = context.Event15s context.Load(Of Event15)(context.GetEvent15Query()) SelectorEvent = ConditionalStyleSelector.Eventitem.Event15 End If Dim HostNameColumn As New GridViewDataColumn() 'Binding is a Boolean property similar to tne one from your example HostNameColumn.DataMemberBinding = New System.Windows.Data.Binding("HOSTNAME") HostNameColumn.Width = 150 HostNameColumn.IsFilterable = False HostNameColumn.IsSortable = False HostNameColumn.IsGroupable = False HostNameColumn.IsReorderable = False 'The grid is preferrable due to its flexibility Dim border As New Grid() border.Height = 170 border.Margin = New Thickness(1, 0, -151, 0) Dim textBlock As New TextBlock() textBlock.Text = "Hostname" textBlock.VerticalAlignment = VerticalAlignment.Bottom textBlock.HorizontalAlignment = HorizontalAlignment.Left textBlock.FontSize = 11 textBlock.FontWeight = FontWeights.Normal textBlock.TextAlignment = TextAlignment.Center textBlock.UseLayoutRounding = True textBlock.TextTrimming = TextTrimming.None textBlock.Margin = New Thickness(9, 0, 0, 0) Dim transform As New RotateTransform() transform.Angle = 270 textBlock.RenderTransform = transform border.Children.Add(textBlock) HostNameColumn.Header = border HostNameColumn.IsReadOnly = True Me.CheckListItemssDataGrid.Columns.Add(HostNameColumn) If EventAdmin.Task1 <> "" Then If EventAdmin.Task1 IsNot Nothing Then Dim Task1 As String = EventAdmin.Task1.ToString Dim Task1Column As New GridViewColumn() Task1Column.Width = 48 Task1Column.UniqueName = "Task1Column" Dim border1 As New Grid() border1.Height = 170 border1.Margin = New Thickness(1, 0, -151, 0) Dim textBlock1 As New TextBlock() textBlock1.Text = Task1 textBlock1.VerticalAlignment = VerticalAlignment.Bottom textBlock1.HorizontalAlignment = HorizontalAlignment.Left textBlock1.FontSize = 11 textBlock1.FontWeight = FontWeights.Normal textBlock1.TextAlignment = TextAlignment.Center textBlock1.UseLayoutRounding = True textBlock1.TextTrimming = TextTrimming.None textBlock1.Margin = New Thickness(9, 0, 0, 0) Dim transform1 As New RotateTransform() transform1.Angle = 270 textBlock1.RenderTransform = transform1 border1.Children.Add(textBlock1) Task1Column.Header = border1 'Task1Column.IsThreeState = True Task1Column.IsSortable = False Task1Column.IsResizable = False Task1Column.IsFilterable = False Task1Column.IsGroupable = False Task1Column.CellTemplate = TryCast(Me.Resources("Task1CBTemplate"), DataTemplate) 'Task1Column.DataMemberBinding = New System.Windows.Data.Binding("TASK1") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK1 selector.EventToCheck = SelectorEvent Task1Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task1Column) End If End If If EventAdmin.Task2 <> "" Then If EventAdmin.Task2 IsNot Nothing Then Dim Task2 As String = EventAdmin.Task2.ToString Dim Task2Column As New GridViewColumn() Task2Column.Width = 48 Task2Column.UniqueName = "Task2Column" Dim border2 As New Grid() border2.Height = 170 border2.Margin = New Thickness(1, 0, -151, 0) Dim textBlock2 As New TextBlock() textBlock2.Text = Task2 textBlock2.VerticalAlignment = VerticalAlignment.Bottom textBlock2.HorizontalAlignment = HorizontalAlignment.Left textBlock2.FontSize = 11 textBlock2.FontWeight = FontWeights.Normal textBlock2.TextAlignment = TextAlignment.Center textBlock2.UseLayoutRounding = True textBlock2.TextTrimming = TextTrimming.None textBlock2.Margin = New Thickness(9, 0, 0, 0) Dim transform2 As New RotateTransform() transform2.Angle = 270 textBlock2.RenderTransform = transform2 border2.Children.Add(textBlock2) Task2Column.Header = border2 Task2Column.IsSortable = False Task2Column.IsResizable = False Task2Column.IsFilterable = False Task2Column.IsGroupable = False Task2Column.CellTemplate = TryCast(Me.Resources("Task2CBTemplate"), DataTemplate) 'Task2Column.DataMemberBinding = New System.Windows.Data.Binding("TASK2") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK2 selector.EventToCheck = SelectorEvent Task2Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task2Column) End If End If If EventAdmin.Task3 <> "" Then If EventAdmin.Task3 IsNot Nothing Then Dim Task3 As String = EventAdmin.Task3.ToString Dim Task3Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task3Column.Width = 48 Task3Column.UniqueName = "Task3Column" 'The grid is preferrable due to its flexibility Dim border3 As New Grid() border3.Height = 170 border3.Margin = New Thickness(1, 0, -151, 0) Dim textBlock3 As New TextBlock() textBlock3.Text = Task3 textBlock3.VerticalAlignment = VerticalAlignment.Bottom textBlock3.HorizontalAlignment = HorizontalAlignment.Left textBlock3.FontSize = 11 textBlock3.FontWeight = FontWeights.Normal textBlock3.TextAlignment = TextAlignment.Center textBlock3.UseLayoutRounding = True textBlock3.TextTrimming = TextTrimming.None textBlock3.Margin = New Thickness(9, 0, 0, 0) Dim transform3 As New RotateTransform() transform3.Angle = 270 textBlock3.RenderTransform = transform3 border3.Children.Add(textBlock3) Task3Column.Header = border3 Task3Column.IsSortable = False Task3Column.IsResizable = False Task3Column.IsFilterable = False Task3Column.IsGroupable = False Task3Column.CellTemplate = TryCast(Me.Resources("Task3CBTemplate"), DataTemplate) 'Task3Column.DataMemberBinding = New System.Windows.Data.Binding("TASK3") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK3 selector.EventToCheck = SelectorEvent Task3Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task3Column) End If End If If EventAdmin.Task4 <> "" Then If EventAdmin.Task4 IsNot Nothing Then Dim Task4 As String = EventAdmin.Task4.ToString Dim Task4Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task4Column.Width = 48 Task4Column.UniqueName = "Task4Column" 'The grid is preferrable due to its flexibility Dim border4 As New Grid() border4.Height = 170 border4.Margin = New Thickness(1, 0, -151, 0) Dim textBlock4 As New TextBlock() textBlock4.Text = Task4 textBlock4.VerticalAlignment = VerticalAlignment.Bottom textBlock4.HorizontalAlignment = HorizontalAlignment.Left textBlock4.FontSize = 11 textBlock4.FontWeight = FontWeights.Normal textBlock4.TextAlignment = TextAlignment.Center textBlock4.UseLayoutRounding = True textBlock4.TextTrimming = TextTrimming.None textBlock4.Margin = New Thickness(9, 0, 0, 0) Dim transform4 As New RotateTransform() transform4.Angle = 270 textBlock4.RenderTransform = transform4 border4.Children.Add(textBlock4) Task4Column.Header = border4 Task4Column.IsSortable = False Task4Column.IsResizable = False Task4Column.IsFilterable = False Task4Column.IsGroupable = False Task4Column.CellTemplate = TryCast(Me.Resources("Task4CBTemplate"), DataTemplate) 'Task4Column.DataMemberBinding = New System.Windows.Data.Binding("TASK4") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK4 selector.EventToCheck = SelectorEvent Task4Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task4Column) End If End If If EventAdmin.Task5 <> "" Then If EventAdmin.Task5 IsNot Nothing Then Dim Task5 As String = EventAdmin.Task5.ToString Dim Task5Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task5Column.Width = 48 Task5Column.UniqueName = "Task5Column" 'The grid is preferrable due to its flexibility Dim border5 As New Grid() border5.Height = 170 border5.Margin = New Thickness(1, 0, -151, 0) Dim textBlock5 As New TextBlock() textBlock5.Text = Task5 textBlock5.VerticalAlignment = VerticalAlignment.Bottom textBlock5.HorizontalAlignment = HorizontalAlignment.Left textBlock5.FontSize = 11 textBlock5.FontWeight = FontWeights.Normal textBlock5.TextAlignment = TextAlignment.Center textBlock5.UseLayoutRounding = True textBlock5.TextTrimming = TextTrimming.None textBlock5.Margin = New Thickness(9, 0, 0, 0) Dim transform5 As New RotateTransform() transform5.Angle = 270 textBlock5.RenderTransform = transform5 border5.Children.Add(textBlock5) Task5Column.Header = border5 Task5Column.IsSortable = False Task5Column.IsResizable = False Task5Column.IsFilterable = False Task5Column.IsGroupable = False Task5Column.CellTemplate = TryCast(Me.Resources("Task5CBTemplate"), DataTemplate) 'Task5Column.DataMemberBinding = New System.Windows.Data.Binding("TASK5") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK5 selector.EventToCheck = SelectorEvent Task5Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task5Column) End If End If If EventAdmin.Task6 <> "" Then If EventAdmin.Task6 IsNot Nothing Then Dim Task6 As String = EventAdmin.Task6.ToString Dim Task6Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task6Column.Width = 48 Task6Column.UniqueName = "Task6Column" 'The grid is preferrable due to its flexibility Dim border6 As New Grid() border6.Height = 170 border6.Margin = New Thickness(1, 0, -151, 0) Dim textBlock6 As New TextBlock() textBlock6.Text = Task6 textBlock6.VerticalAlignment = VerticalAlignment.Bottom textBlock6.HorizontalAlignment = HorizontalAlignment.Left textBlock6.FontSize = 11 textBlock6.FontWeight = FontWeights.Normal textBlock6.TextAlignment = TextAlignment.Center textBlock6.UseLayoutRounding = True textBlock6.TextTrimming = TextTrimming.None textBlock6.Margin = New Thickness(9, 0, 0, 0) Dim transform6 As New RotateTransform() transform6.Angle = 270 textBlock6.RenderTransform = transform6 border6.Children.Add(textBlock6) Task6Column.Header = border6 Task6Column.IsSortable = False Task6Column.IsResizable = False Task6Column.IsFilterable = False Task6Column.IsGroupable = False Task6Column.CellTemplate = TryCast(Me.Resources("Task6CBTemplate"), DataTemplate) 'Task6Column.DataMemberBinding = New System.Windows.Data.Binding("TASK6") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK6 selector.EventToCheck = SelectorEvent Task6Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task6Column) End If End If If EventAdmin.Task7 <> "" Then If EventAdmin.Task7 IsNot Nothing Then Dim Task7 As String = EventAdmin.Task7.ToString Dim Task7Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task7Column.Width = 48 Task7Column.UniqueName = "Task7Column" 'The grid is preferrable due to its flexibility Dim border7 As New Grid() border7.Height = 170 border7.Margin = New Thickness(1, 0, -151, 0) Dim textBlock7 As New TextBlock() textBlock7.Text = Task7 textBlock7.VerticalAlignment = VerticalAlignment.Bottom textBlock7.HorizontalAlignment = HorizontalAlignment.Left textBlock7.FontSize = 11 textBlock7.FontWeight = FontWeights.Normal textBlock7.TextAlignment = TextAlignment.Center textBlock7.UseLayoutRounding = True textBlock7.TextTrimming = TextTrimming.None textBlock7.Margin = New Thickness(9, 0, 0, 0) Dim transform7 As New RotateTransform() transform7.Angle = 270 textBlock7.RenderTransform = transform7 border7.Children.Add(textBlock7) Task7Column.Header = border7 Task7Column.IsSortable = False Task7Column.IsResizable = False Task7Column.IsFilterable = False Task7Column.IsGroupable = False Task7Column.CellTemplate = TryCast(Me.Resources("Task7CBTemplate"), DataTemplate) 'Task7Column.DataMemberBinding = New System.Windows.Data.Binding("TASK7") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK7 selector.EventToCheck = SelectorEvent Task7Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task7Column) End If End If If EventAdmin.Task8 <> "" Then If EventAdmin.Task8 IsNot Nothing Then Dim Task8 As String = EventAdmin.Task8.ToString Dim Task8Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task8Column.Width = 48 Task8Column.UniqueName = "Task8Column" 'The grid is preferrable due to its flexibility Dim border8 As New Grid() border8.Height = 170 border8.Margin = New Thickness(1, 0, -151, 0) Dim textBlock8 As New TextBlock() textBlock8.Text = Task8 textBlock8.VerticalAlignment = VerticalAlignment.Bottom textBlock8.HorizontalAlignment = HorizontalAlignment.Left textBlock8.FontSize = 11 textBlock8.FontWeight = FontWeights.Normal textBlock8.TextAlignment = TextAlignment.Center textBlock8.UseLayoutRounding = True textBlock8.TextTrimming = TextTrimming.None textBlock8.Margin = New Thickness(9, 0, 0, 0) Dim transform8 As New RotateTransform() transform8.Angle = 270 textBlock8.RenderTransform = transform8 border8.Children.Add(textBlock8) Task8Column.Header = border8 Task8Column.IsSortable = False Task8Column.IsResizable = False Task8Column.IsFilterable = False Task8Column.IsGroupable = False Task8Column.CellTemplate = TryCast(Me.Resources("Task8CBTemplate"), DataTemplate) 'Task8Column.DataMemberBinding = New System.Windows.Data.Binding("TASK8") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK8 selector.EventToCheck = SelectorEvent Task8Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task8Column) End If End If If EventAdmin.Task9 <> "" Then If EventAdmin.Task9 IsNot Nothing Then Dim Task9 As String = EventAdmin.Task9.ToString Dim Task9Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task9Column.Width = 48 Task9Column.UniqueName = "Task9Column" 'The grid is preferrable due to its flexibility Dim border9 As New Grid() border9.Height = 170 border9.Margin = New Thickness(1, 0, -151, 0) Dim textBlock9 As New TextBlock() textBlock9.Text = Task9 textBlock9.VerticalAlignment = VerticalAlignment.Bottom textBlock9.HorizontalAlignment = HorizontalAlignment.Left textBlock9.FontSize = 11 textBlock9.FontWeight = FontWeights.Normal textBlock9.TextAlignment = TextAlignment.Center textBlock9.UseLayoutRounding = True textBlock9.TextTrimming = TextTrimming.None textBlock9.Margin = New Thickness(9, 0, 0, 0) Dim transform9 As New RotateTransform() transform9.Angle = 270 textBlock9.RenderTransform = transform9 border9.Children.Add(textBlock9) Task9Column.Header = border9 Task9Column.IsSortable = False Task9Column.IsResizable = False Task9Column.IsFilterable = False Task9Column.IsGroupable = False Task9Column.CellTemplate = TryCast(Me.Resources("Task9CBTemplate"), DataTemplate) 'Task9Column.DataMemberBinding = New System.Windows.Data.Binding("TASK9") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK9 selector.EventToCheck = SelectorEvent Task9Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task9Column) End If End If If EventAdmin.Task10 <> "" Then If EventAdmin.Task10 IsNot Nothing Then Dim Task10 As String = EventAdmin.Task10.ToString Dim Task10Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task10Column.Width = 48 Task10Column.UniqueName = "Task10Column" 'The grid is preferrable due to its flexibility Dim border10 As New Grid() border10.Height = 170 border10.Margin = New Thickness(1, 0, -151, 0) Dim textBlock10 As New TextBlock() textBlock10.Text = Task10 textBlock10.VerticalAlignment = VerticalAlignment.Bottom textBlock10.HorizontalAlignment = HorizontalAlignment.Left textBlock10.FontSize = 11 textBlock10.FontWeight = FontWeights.Normal textBlock10.TextAlignment = TextAlignment.Center textBlock10.UseLayoutRounding = True textBlock10.TextTrimming = TextTrimming.None textBlock10.Margin = New Thickness(9, 0, 0, 0) Dim transform10 As New RotateTransform() transform10.Angle = 270 textBlock10.RenderTransform = transform10 border10.Children.Add(textBlock10) Task10Column.Header = border10 Task10Column.IsSortable = False Task10Column.IsResizable = False Task10Column.IsFilterable = False Task10Column.IsGroupable = False Task10Column.CellTemplate = TryCast(Me.Resources("Task10CBTemplate"), DataTemplate) 'Task10Column.DataMemberBinding = New System.Windows.Data.Binding("Task10") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK10 selector.EventToCheck = SelectorEvent Task10Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task10Column) End If End If If EventAdmin.Task11 <> "" Then If EventAdmin.Task11 IsNot Nothing Then Dim Task11 As String = EventAdmin.Task11.ToString Dim Task11Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task11Column.Width = 48 Task11Column.UniqueName = "Task11Column" 'The grid is preferrable due to its flexibility Dim border11 As New Grid() border11.Height = 170 border11.Margin = New Thickness(1, 0, -151, 0) Dim textBlock11 As New TextBlock() textBlock11.Text = Task11 textBlock11.VerticalAlignment = VerticalAlignment.Bottom textBlock11.HorizontalAlignment = HorizontalAlignment.Left textBlock11.FontSize = 11 textBlock11.FontWeight = FontWeights.Normal textBlock11.TextAlignment = TextAlignment.Center textBlock11.UseLayoutRounding = True textBlock11.TextTrimming = TextTrimming.None textBlock11.Margin = New Thickness(9, 0, 0, 0) Dim transform11 As New RotateTransform() transform11.Angle = 270 textBlock11.RenderTransform = transform11 border11.Children.Add(textBlock11) Task11Column.Header = border11 Task11Column.IsSortable = False Task11Column.IsResizable = False Task11Column.IsFilterable = False Task11Column.IsGroupable = False Task11Column.CellTemplate = TryCast(Me.Resources("Task11CBTemplate"), DataTemplate) 'Task11Column.DataMemberBinding = New System.Windows.Data.Binding("Task11") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK11 selector.EventToCheck = SelectorEvent Task11Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task11Column) End If End If If EventAdmin.Task12 <> "" Then If EventAdmin.Task12 IsNot Nothing Then Dim Task12 As String = EventAdmin.Task12.ToString Dim Task12Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task12Column.Width = 48 Task12Column.UniqueName = "Task12Column" 'The grid is preferrable due to its flexibility Dim border12 As New Grid() border12.Height = 170 border12.Margin = New Thickness(1, 0, -151, 0) Dim textBlock12 As New TextBlock() textBlock12.Text = Task12 textBlock12.VerticalAlignment = VerticalAlignment.Bottom textBlock12.HorizontalAlignment = HorizontalAlignment.Left textBlock12.FontSize = 11 textBlock12.FontWeight = FontWeights.Normal textBlock12.TextAlignment = TextAlignment.Center textBlock12.UseLayoutRounding = True textBlock12.TextTrimming = TextTrimming.None textBlock12.Margin = New Thickness(9, 0, 0, 0) Dim transform12 As New RotateTransform() transform12.Angle = 270 textBlock12.RenderTransform = transform12 border12.Children.Add(textBlock12) Task12Column.Header = border12 Task12Column.IsSortable = False Task12Column.IsResizable = False Task12Column.IsFilterable = False Task12Column.IsGroupable = False Task12Column.CellTemplate = TryCast(Me.Resources("Task12CBTemplate"), DataTemplate) 'Task12Column.DataMemberBinding = New System.Windows.Data.Binding("Task12") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK12 selector.EventToCheck = SelectorEvent Task12Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task12Column) End If End If If EventAdmin.Task13 <> "" Then If EventAdmin.Task13 IsNot Nothing Then Dim Task13 As String = EventAdmin.Task13.ToString Dim Task13Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task13Column.Width = 48 Task13Column.UniqueName = "Task13Column" 'The grid is preferrable due to its flexibility Dim border13 As New Grid() border13.Height = 170 border13.Margin = New Thickness(1, 0, -151, 0) Dim textBlock13 As New TextBlock() textBlock13.Text = Task13 textBlock13.VerticalAlignment = VerticalAlignment.Bottom textBlock13.HorizontalAlignment = HorizontalAlignment.Left textBlock13.FontSize = 11 textBlock13.FontWeight = FontWeights.Normal textBlock13.TextAlignment = TextAlignment.Center textBlock13.UseLayoutRounding = True textBlock13.TextTrimming = TextTrimming.None textBlock13.Margin = New Thickness(9, 0, 0, 0) Dim transform13 As New RotateTransform() transform13.Angle = 270 textBlock13.RenderTransform = transform13 border13.Children.Add(textBlock13) Task13Column.Header = border13 Task13Column.IsSortable = False Task13Column.IsResizable = False Task13Column.IsFilterable = False Task13Column.IsGroupable = False Task13Column.CellTemplate = TryCast(Me.Resources("Task13CBTemplate"), DataTemplate) 'Task13Column.DataMemberBinding = New System.Windows.Data.Binding("Task13") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK13 selector.EventToCheck = SelectorEvent Task13Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task13Column) End If End If If EventAdmin.Task14 <> "" Then If EventAdmin.Task14 IsNot Nothing Then Dim Task14 As String = EventAdmin.Task14.ToString Dim Task14Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task14Column.Width = 48 Task14Column.UniqueName = "Task14Column" 'The grid is preferrable due to its flexibility Dim border14 As New Grid() border14.Height = 170 border14.Margin = New Thickness(1, 0, -151, 0) Dim textBlock14 As New TextBlock() textBlock14.Text = Task14 textBlock14.VerticalAlignment = VerticalAlignment.Bottom textBlock14.HorizontalAlignment = HorizontalAlignment.Left textBlock14.FontSize = 11 textBlock14.FontWeight = FontWeights.Normal textBlock14.TextAlignment = TextAlignment.Center textBlock14.UseLayoutRounding = True textBlock14.TextTrimming = TextTrimming.None textBlock14.Margin = New Thickness(9, 0, 0, 0) Dim transform14 As New RotateTransform() transform14.Angle = 270 textBlock14.RenderTransform = transform14 border14.Children.Add(textBlock14) Task14Column.Header = border14 Task14Column.IsSortable = False Task14Column.IsResizable = False Task14Column.IsFilterable = False Task14Column.IsGroupable = False Task14Column.CellTemplate = TryCast(Me.Resources("Task14CBTemplate"), DataTemplate) 'Task14Column.DataMemberBinding = New System.Windows.Data.Binding("Task14") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK14 selector.EventToCheck = SelectorEvent Task14Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task14Column) End If End If If EventAdmin.Task15 <> "" Then If EventAdmin.Task15 IsNot Nothing Then Dim Task15 As String = EventAdmin.Task15.ToString Dim Task15Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task15Column.Width = 48 Task15Column.UniqueName = "Task15Column" 'The grid is preferrable due to its flexibility Dim border15 As New Grid() border15.Height = 170 border15.Margin = New Thickness(1, 0, -151, 0) Dim textBlock15 As New TextBlock() textBlock15.Text = Task15 textBlock15.VerticalAlignment = VerticalAlignment.Bottom textBlock15.HorizontalAlignment = HorizontalAlignment.Left textBlock15.FontSize = 11 textBlock15.FontWeight = FontWeights.Normal textBlock15.TextAlignment = TextAlignment.Center textBlock15.UseLayoutRounding = True textBlock15.TextTrimming = TextTrimming.None textBlock15.Margin = New Thickness(9, 0, 0, 0) Dim transform15 As New RotateTransform() transform15.Angle = 270 textBlock15.RenderTransform = transform15 border15.Children.Add(textBlock15) Task15Column.Header = border15 Task15Column.IsSortable = False Task15Column.IsResizable = False Task15Column.IsFilterable = False Task15Column.IsGroupable = False Task15Column.CellTemplate = TryCast(Me.Resources("Task15CBTemplate"), DataTemplate) 'Task15Column.DataMemberBinding = New System.Windows.Data.Binding("Task15") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK15 selector.EventToCheck = SelectorEvent Task15Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task15Column) End If End If If EventAdmin.Task16 <> "" Then If EventAdmin.Task16 IsNot Nothing Then Dim Task16 As String = EventAdmin.Task16.ToString Dim Task16Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task16Column.Width = 48 Task16Column.UniqueName = "Task16Column" 'The grid is preferrable due to its flexibility Dim border16 As New Grid() border16.Height = 170 border16.Margin = New Thickness(1, 0, -151, 0) Dim textBlock16 As New TextBlock() textBlock16.Text = Task16 textBlock16.VerticalAlignment = VerticalAlignment.Bottom textBlock16.HorizontalAlignment = HorizontalAlignment.Left textBlock16.FontSize = 11 textBlock16.FontWeight = FontWeights.Normal textBlock16.TextAlignment = TextAlignment.Center textBlock16.UseLayoutRounding = True textBlock16.TextTrimming = TextTrimming.None textBlock16.Margin = New Thickness(9, 0, 0, 0) Dim transform16 As New RotateTransform() transform16.Angle = 270 textBlock16.RenderTransform = transform16 border16.Children.Add(textBlock16) Task16Column.Header = border16 Task16Column.IsSortable = False Task16Column.IsResizable = False Task16Column.IsFilterable = False Task16Column.IsGroupable = False Task16Column.CellTemplate = TryCast(Me.Resources("Task16CBTemplate"), DataTemplate) 'Task16Column.DataMemberBinding = New System.Windows.Data.Binding("Task16") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK16 selector.EventToCheck = SelectorEvent Task16Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task16Column) End If End If If EventAdmin.Task17 <> "" Then If EventAdmin.Task17 IsNot Nothing Then Dim Task17 As String = EventAdmin.Task17.ToString Dim Task17Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task17Column.Width = 48 Task17Column.UniqueName = "Task17Column" 'The grid is preferrable due to its flexibility Dim border17 As New Grid() border17.Height = 170 border17.Margin = New Thickness(1, 0, -151, 0) Dim textBlock17 As New TextBlock() textBlock17.Text = Task17 textBlock17.VerticalAlignment = VerticalAlignment.Bottom textBlock17.HorizontalAlignment = HorizontalAlignment.Left textBlock17.FontSize = 11 textBlock17.FontWeight = FontWeights.Normal textBlock17.TextAlignment = TextAlignment.Center textBlock17.UseLayoutRounding = True textBlock17.TextTrimming = TextTrimming.None textBlock17.Margin = New Thickness(9, 0, 0, 0) Dim transform17 As New RotateTransform() transform17.Angle = 270 textBlock17.RenderTransform = transform17 border17.Children.Add(textBlock17) Task17Column.Header = border17 Task17Column.IsSortable = False Task17Column.IsResizable = False Task17Column.IsFilterable = False Task17Column.IsGroupable = False Task17Column.CellTemplate = TryCast(Me.Resources("Task17CBTemplate"), DataTemplate) 'Task17Column.DataMemberBinding = New System.Windows.Data.Binding("Task17") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK17 selector.EventToCheck = SelectorEvent Task17Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task17Column) End If End If If EventAdmin.Task18 <> "" Then If EventAdmin.Task18 IsNot Nothing Then Dim Task18 As String = EventAdmin.Task18.ToString Dim Task18Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task18Column.Width = 48 Task18Column.UniqueName = "Task18Column" 'The grid is preferrable due to its flexibility Dim border18 As New Grid() border18.Height = 170 border18.Margin = New Thickness(1, 0, -151, 0) Dim textBlock18 As New TextBlock() textBlock18.Text = Task18 textBlock18.VerticalAlignment = VerticalAlignment.Bottom textBlock18.HorizontalAlignment = HorizontalAlignment.Left textBlock18.FontSize = 11 textBlock18.FontWeight = FontWeights.Normal textBlock18.TextAlignment = TextAlignment.Center textBlock18.UseLayoutRounding = True textBlock18.TextTrimming = TextTrimming.None textBlock18.Margin = New Thickness(9, 0, 0, 0) Dim transform18 As New RotateTransform() transform18.Angle = 270 textBlock18.RenderTransform = transform18 border18.Children.Add(textBlock18) Task18Column.Header = border18 Task18Column.IsSortable = False Task18Column.IsResizable = False Task18Column.IsFilterable = False Task18Column.IsGroupable = False Task18Column.CellTemplate = TryCast(Me.Resources("Task18CBTemplate"), DataTemplate) 'Task18Column.DataMemberBinding = New System.Windows.Data.Binding("Task18") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK18 selector.EventToCheck = SelectorEvent Task18Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task18Column) End If End If If EventAdmin.Task19 <> "" Then If EventAdmin.Task19 IsNot Nothing Then Dim Task19 As String = EventAdmin.Task19.ToString Dim Task19Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task19Column.Width = 48 Task19Column.UniqueName = "Task19Column" 'The grid is preferrable due to its flexibility Dim border19 As New Grid() border19.Height = 170 border19.Margin = New Thickness(1, 0, -151, 0) Dim textBlock19 As New TextBlock() textBlock19.Text = Task19 textBlock19.VerticalAlignment = VerticalAlignment.Bottom textBlock19.HorizontalAlignment = HorizontalAlignment.Left textBlock19.FontSize = 11 textBlock19.FontWeight = FontWeights.Normal textBlock19.TextAlignment = TextAlignment.Center textBlock19.UseLayoutRounding = True textBlock19.TextTrimming = TextTrimming.None textBlock19.Margin = New Thickness(9, 0, 0, 0) Dim transform19 As New RotateTransform() transform19.Angle = 270 textBlock19.RenderTransform = transform19 border19.Children.Add(textBlock19) Task19Column.Header = border19 Task19Column.IsSortable = False Task19Column.IsResizable = False Task19Column.IsFilterable = False Task19Column.IsGroupable = False Task19Column.CellTemplate = TryCast(Me.Resources("Task19CBTemplate"), DataTemplate) 'Task19Column.DataMemberBinding = New System.Windows.Data.Binding("Task19") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK19 selector.EventToCheck = SelectorEvent Task19Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task19Column) End If End If If EventAdmin.Task20 <> "" Then If EventAdmin.Task20 IsNot Nothing Then Dim Task20 As String = EventAdmin.Task20.ToString Dim Task20Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task20Column.Width = 48 Task20Column.UniqueName = "Task20Column" 'The grid is preferrable due to its flexibility Dim border20 As New Grid() border20.Height = 170 border20.Margin = New Thickness(1, 0, -151, 0) Dim textBlock20 As New TextBlock() textBlock20.Text = Task20 textBlock20.VerticalAlignment = VerticalAlignment.Bottom textBlock20.HorizontalAlignment = HorizontalAlignment.Left textBlock20.FontSize = 11 textBlock20.FontWeight = FontWeights.Normal textBlock20.TextAlignment = TextAlignment.Center textBlock20.UseLayoutRounding = True textBlock20.TextTrimming = TextTrimming.None textBlock20.Margin = New Thickness(9, 0, 0, 0) Dim transform20 As New RotateTransform() transform20.Angle = 270 textBlock20.RenderTransform = transform20 border20.Children.Add(textBlock20) Task20Column.Header = border20 Task20Column.IsSortable = False Task20Column.IsResizable = False Task20Column.IsFilterable = False Task20Column.IsGroupable = False Task20Column.CellTemplate = TryCast(Me.Resources("Task20CBTemplate"), DataTemplate) 'Task20Column.DataMemberBinding = New System.Windows.Data.Binding("Task20") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK20 selector.EventToCheck = SelectorEvent Task20Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task20Column) End If End If If EventAdmin.Task21 <> "" Then If EventAdmin.Task21 IsNot Nothing Then Dim Task21 As String = EventAdmin.Task21.ToString Dim Task21Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task21Column.Width = 48 Task21Column.UniqueName = "Task21Column" 'The grid is preferrable due to its flexibility Dim border21 As New Grid() border21.Height = 170 border21.Margin = New Thickness(1, 0, -151, 0) Dim textBlock21 As New TextBlock() textBlock21.Text = Task21 textBlock21.VerticalAlignment = VerticalAlignment.Bottom textBlock21.HorizontalAlignment = HorizontalAlignment.Left textBlock21.FontSize = 11 textBlock21.FontWeight = FontWeights.Normal textBlock21.TextAlignment = TextAlignment.Center textBlock21.UseLayoutRounding = True textBlock21.TextTrimming = TextTrimming.None textBlock21.Margin = New Thickness(9, 0, 0, 0) Dim transform21 As New RotateTransform() transform21.Angle = 270 textBlock21.RenderTransform = transform21 border21.Children.Add(textBlock21) Task21Column.Header = border21 Task21Column.IsSortable = False Task21Column.IsResizable = False Task21Column.IsFilterable = False Task21Column.IsGroupable = False 'Task21Column.DataMemberBinding = New System.Windows.Data.Binding("Task21") Task21Column.CellTemplate = TryCast(Me.Resources("Task21CBTemplate"), DataTemplate) Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK21 selector.EventToCheck = SelectorEvent Task21Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task21Column) End If End If If EventAdmin.Task22 <> "" Then If EventAdmin.Task22 IsNot Nothing Then Dim Task22 As String = EventAdmin.Task22.ToString Dim Task22Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task22Column.Width = 48 Task22Column.UniqueName = "Task22Column" 'The grid is preferrable due to its flexibility Dim border22 As New Grid() border22.Height = 170 border22.Margin = New Thickness(1, 0, -151, 0) Dim textBlock22 As New TextBlock() textBlock22.Text = Task22 textBlock22.VerticalAlignment = VerticalAlignment.Bottom textBlock22.HorizontalAlignment = HorizontalAlignment.Left textBlock22.FontSize = 11 textBlock22.FontWeight = FontWeights.Normal textBlock22.TextAlignment = TextAlignment.Center textBlock22.UseLayoutRounding = True textBlock22.TextTrimming = TextTrimming.None textBlock22.Margin = New Thickness(9, 0, 0, 0) Dim transform22 As New RotateTransform() transform22.Angle = 270 textBlock22.RenderTransform = transform22 border22.Children.Add(textBlock22) Task22Column.Header = border22 Task22Column.IsSortable = False Task22Column.IsResizable = False Task22Column.IsFilterable = False Task22Column.IsGroupable = False Task22Column.CellTemplate = TryCast(Me.Resources("Task22CBTemplate"), DataTemplate) 'Task22Column.DataMemberBinding = New System.Windows.Data.Binding("Task22") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK22 selector.EventToCheck = SelectorEvent Task22Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task22Column) End If End If If EventAdmin.Task23 <> "" Then If EventAdmin.Task23 IsNot Nothing Then Dim Task23 As String = EventAdmin.Task23.ToString Dim Task23Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task23Column.Width = 48 Task23Column.UniqueName = "Task23Column" 'The grid is preferrable due to its flexibility Dim border23 As New Grid() border23.Height = 170 border23.Margin = New Thickness(1, 0, -151, 0) Dim textBlock23 As New TextBlock() textBlock23.Text = Task23 textBlock23.VerticalAlignment = VerticalAlignment.Bottom textBlock23.HorizontalAlignment = HorizontalAlignment.Left textBlock23.FontSize = 11 textBlock23.FontWeight = FontWeights.Normal textBlock23.TextAlignment = TextAlignment.Center textBlock23.UseLayoutRounding = True textBlock23.TextTrimming = TextTrimming.None textBlock23.Margin = New Thickness(9, 0, 0, 0) Dim transform23 As New RotateTransform() transform23.Angle = 270 textBlock23.RenderTransform = transform23 border23.Children.Add(textBlock23) Task23Column.Header = border23 Task23Column.IsSortable = False Task23Column.IsResizable = False Task23Column.IsFilterable = False Task23Column.IsGroupable = False 'Task23Column.DataMemberBinding = New System.Windows.Data.Binding("Task23") Task23Column.CellTemplate = TryCast(Me.Resources("Task23CBTemplate"), DataTemplate) Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK23 selector.EventToCheck = SelectorEvent Task23Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task23Column) End If End If If EventAdmin.Task24 <> "" Then If EventAdmin.Task24 IsNot Nothing Then Dim Task24 As String = EventAdmin.Task24.ToString Dim Task24Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task24Column.Width = 48 Task24Column.UniqueName = "Task24Column" 'The grid is preferrable due to its flexibility Dim border24 As New Grid() border24.Height = 170 border24.Margin = New Thickness(1, 0, -151, 0) Dim textBlock24 As New TextBlock() textBlock24.Text = Task24 textBlock24.VerticalAlignment = VerticalAlignment.Bottom textBlock24.HorizontalAlignment = HorizontalAlignment.Left textBlock24.FontSize = 11 textBlock24.FontWeight = FontWeights.Normal textBlock24.TextAlignment = TextAlignment.Center textBlock24.UseLayoutRounding = True textBlock24.TextTrimming = TextTrimming.None textBlock24.Margin = New Thickness(9, 0, 0, 0) Dim transform24 As New RotateTransform() transform24.Angle = 270 textBlock24.RenderTransform = transform24 border24.Children.Add(textBlock24) Task24Column.Header = border24 Task24Column.IsSortable = False Task24Column.IsResizable = False Task24Column.IsFilterable = False Task24Column.IsGroupable = False Task24Column.CellTemplate = TryCast(Me.Resources("Task24CBTemplate"), DataTemplate) 'Task24Column.DataMemberBinding = New System.Windows.Data.Binding("Task24") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK24 selector.EventToCheck = SelectorEvent Task24Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task24Column) End If End If If EventAdmin.Task25 <> "" Then If EventAdmin.Task25 IsNot Nothing Then Dim Task25 As String = EventAdmin.Task25.ToString Dim Task25Column As New GridViewColumn() 'Binding is a Boolean property similar to tne one from your example Task25Column.Width = 48 Task25Column.UniqueName = "Task25Column" 'The grid is preferrable due to its flexibility Dim border25 As New Grid() border25.Height = 170 border25.Margin = New Thickness(1, 0, -151, 0) Dim textBlock25 As New TextBlock() textBlock25.Text = Task25 textBlock25.VerticalAlignment = VerticalAlignment.Bottom textBlock25.HorizontalAlignment = HorizontalAlignment.Left textBlock25.FontSize = 11 textBlock25.FontWeight = FontWeights.Normal textBlock25.TextAlignment = TextAlignment.Center textBlock25.UseLayoutRounding = True textBlock25.TextTrimming = TextTrimming.None textBlock25.Margin = New Thickness(9, 0, 0, 0) Dim transform25 As New RotateTransform() transform25.Angle = 270 textBlock25.RenderTransform = transform25 border25.Children.Add(textBlock25) Task25Column.Header = border25 Task25Column.IsSortable = False Task25Column.IsResizable = False Task25Column.IsFilterable = False Task25Column.IsGroupable = False Task25Column.CellTemplate = TryCast(Me.Resources("Task25CBTemplate"), DataTemplate) 'Task25Column. = New System.Windows.Data.Binding("Task25") Dim selector As New ConditionalStyleSelector() selector.ColumnToCheck = ConditionalStyleSelector.CellColumn.TASK25 selector.EventToCheck = SelectorEvent Task25Column.CellStyleSelector = selector Me.CheckListItemssDataGrid.Columns.Add(Task25Column) End If End If Next End SubThe Grid is decalred in XAML as below,
<telerik:RadGridView IsEnabled="False" Margin="0,40,0,0" x:Name="CheckListItemssDataGrid" VerticalAlignment="Stretch" ShowGroupPanel="False" AutoGenerateColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" SelectionMode="Extended" IsReadOnly="False" EnableColumnVirtualization="True" EnableRowVirtualization="True" CanUserDeleteRows="False" CanUserInsertRows="False" HorizontalAlignment="Left" EditTriggers="CellClick" Width="1150" Visibility="Collapsed" DataLoadMode="Synchronous"></telerik:RadGridView>The WCF RIA Datasource is declared in code bahind with Autoload set to False as below,
<riaControls:DomainDataSource AutoLoad="False" Height="0" x:Name="Event1DomainDataSource" QueryName="GetEvent1Query" Width="0" Margin="581,357,579,411" d:IsHidden="True"> <riaControls:DomainDataSource.DomainContext> <my:DomainService1 /> </riaControls:DomainDataSource.DomainContext> </riaControls:DomainDataSource>My main question is what is the best way to show a busy indicator in this circumstance. I have found that if I set the data source to "AutoLoad=False" in XAML that I do not get frozen indicator but I when I do this I cannot figure out when to kill the busy indicator because "Onloaded" and "Loaded events never get called in this instance.
I played with using a timer but it is not acceptable solution.
Please help.
Thanks,
Tim
0
Timothy
Top achievements
Rank 1
answered on 01 Dec 2010, 10:27 PM
Another question with this would be,
Is thereany way to place the "createventgrid()" into a seperate thread or background worker to avoid the UI being locked during this routine. Or anything else I can do.
It not only affects visual busy indication but locks the entire window during the load.
Any ideas would help.
Thank you,
Tim
Is thereany way to place the "createventgrid()" into a seperate thread or background worker to avoid the UI being locked during this routine. Or anything else I can do.
It not only affects visual busy indication but locks the entire window during the load.
Any ideas would help.
Thank you,
Tim
0
Timothy
Top achievements
Rank 1
answered on 01 Dec 2010, 10:34 PM
Simply put:
If "AutoLoad=True" Is set on the datasource than the UI locks during load.
If "Autoload=False" is set on the datasource than the UI doesnt lock but I also have no way to kill the progress bar appropriately because when Autoload=False is declared the datasource.onloaded event never gets called and either does the grid.dataloaded or grid.loaded events. I just need some help to figure out the solution or best method of doing all this. With the datatemplates I have and the styles that get applied it takes up to 30 seconds to populate and show the grid on screen and I dont want to users to stare at a progress bar that doesnt move for 30 seconds. I need a solution.
Might be an easy fix.
Thanks,
Tim
If "AutoLoad=True" Is set on the datasource than the UI locks during load.
If "Autoload=False" is set on the datasource than the UI doesnt lock but I also have no way to kill the progress bar appropriately because when Autoload=False is declared the datasource.onloaded event never gets called and either does the grid.dataloaded or grid.loaded events. I just need some help to figure out the solution or best method of doing all this. With the datatemplates I have and the styles that get applied it takes up to 30 seconds to populate and show the grid on screen and I dont want to users to stare at a progress bar that doesnt move for 30 seconds. I need a solution.
Might be an easy fix.
Thanks,
Tim
0
Timothy
Top achievements
Rank 1
answered on 02 Dec 2010, 09:09 AM
Any ideas?
0
Zinnia
Top achievements
Rank 1
answered on 07 Dec 2010, 05:35 AM
