我有一个在客户记录上显示警报的 Windows 窗体自定义控件。该控件使用 Infragistics 9.1 UltraWinGrid 来显示这些警报,这些警报由业务对象填充的数据集填充。一些用户在查看这些警报时遇到问题;网格将完全空白,就像由于某种原因隐藏了字段一样。此示例代码显示了如何填充网格:
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
我没有成功找到有关此问题的任何信息。我确实添加了一些跟踪逻辑来检查网格行上的 'HiddenResolved' 属性,并等待找出结果。是否还有其他任何可能导致此网格仅对某些用户隐藏而不对其他人隐藏,还有其他任何原因可能导致这种情况仅偶尔发生?