Infragistics UltraWinGrid Hidden Occasionally
-
27-10-2019 - |
Question
I have a Windows Form custom control that displays alerts on a customer record. The control uses an Infragistics 9.1 UltraWinGrid to display these alerts, which is filled from a dataset populated by a business object. Some users are having issues viewing these alerts; the grid will be completely blank, like the fields were hidden for some reason. This sample code shows how the grid is populated:
Private Sub InquiryCallbackAlertList(ByVal sender As Object, ByVal e As FunctionRequestEventArgs)
Try
'Code to populate the dataset mdslist
AlertsGrid.Visible = True
' Filter empty rows
Dim view As DataView = New DataView(mdslist.Tables("ResponseArea"))
view.RowFilter = "ResponseArea_Text <> '' "
'Bind the view
AlertsGrid.SetDataBinding(view, Nothing, True, True)
For Each c As UltraGridColumn In AlertsGrid.DisplayLayout.Bands(0).Columns
c.AutoSizeMode = ColumnAutoSizeMode.AllRowsInBand
c.PerformAutoResize(PerformAutoSizeType.AllRowsInBand)
Next
Me.Focus()
Catch ex As Exception
MsgBox(My.Resources.UnableToCompleteAction, MsgBoxStyle.Information, My.Resources.ApplicationTitle)
End Try
End Sub
I have not had any success finding anything out about this problem. I did add some trace logic to check the 'HiddenResolved' property on the grid rows and am waiting to find out the results of that. Is there anything else that could be causing this grid to only be hidden for some users and not for others, and also could anything else be causing this only to happen occasionally?
Solution
After some logging information, I actually found that all of my columns in this particular grid were being hidden by default. I am attempting to explicitly force the columns to be visible to see if that helps.