1、判断grid中行是否可见
当对ULTRAGRID进行数据筛选后,会有些行无法看到
如果想下载筛选后的数据,或者是对筛选后的数据进行操作,方法为:
Dim rw As Infragistics.Win.UltraWinGrid.UltraGridRow
For Each rw In UltraGrid1.Rows
If rw.HiddenResolved = False Then
'可见
Else
'不可见
End If
Next
2、清除筛选
Dim band AsInfragistics.Win.UltraWinGrid.UltraGridBand
For Each band InUltraGrid1.DisplayLayout.Bands
band.ColumnFilters.ClearAllFilters()
Next
3、引用选中行中的值
如果想双击行标题得出对应列的值,使用的方法为:
Dim p As Point
p =System.Windows.Forms.Cursor.Position
p =Me.UltraGrid1.PointToClient(p)
Dim oui AsInfragistics.Win.UIElement
oui =Me.UltraGrid1.DisplayLayout.UIElement.ElementFromPoint(p)
Dim orowui AsInfragistics.Win.UltraWinGrid.UltraGridRow
orowui =oui.SelectableItem
dim x as string
x=orowui.Cells("编号").Value'编号为列名
当对ULTRAGRID进行数据筛选后,会有些行无法看到
如果想下载筛选后的数据,或者是对筛选后的数据进行操作,方法为:
2、清除筛选
3、引用选中行中的值