TA的每日心情 | 开心 2016-1-29 13:51 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
1.根据字段值,选中所在行,函数如下!
' 根据字段值选择所在的行
Function SelectRowByField(w_DataGridView , Field , FieldText)
' Reporter.Filter = rfDisableAll
For I = 0 to w_DataGridView.RowCount - 1
If w_DataGridView.GetCellProperty(I,Field,"Value") = FieldText Then
w_DataGridView.SelectRow I
SelectRowByField = True
Exit Function
End If
Next
' Reporter.Filter = rfEnableAll
SelectRowByField = False
End Function
RegisterUserFunc "SwfTable","SelectRowByField","SelectRowByField"
2.通过 h=obj.GetROProperty("CurrentRow.Index") '获取当前行号。 |
|