Infragistics UltraWinGrid偶尔隐藏

时间:2011-03-18 20:58:17

标签: vb.net winforms infragistics ultrawingrid

我有一个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'属性,并等待查找结果。还有什么可能导致这个网格只为某些用户而不是其他用户隐藏,还有其他什么可能导致这种情况偶尔发生吗?

1 个答案:

答案 0 :(得分:0)

在一些日志信息之后,我实际上发现默认情况下隐藏了此特定网格中的所有列。我试图明确强制列可见,看看是否有帮助。