以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 如何让ListView绑定RecordGrid (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=145612) |
||||
-- 作者:hongye -- 发布时间:2020/2/2 13:28:00 -- 如何让ListView绑定RecordGrid
如何让ListView绑定RecordGrid
|
||||
-- 作者:有点蓝 -- 发布时间:2020/2/2 21:47:00 -- 无法绑定。换个方式,点击ListView的时候,table表格也选中对应的行,然后RecordGrid绑定table |
||||
-- 作者:hongye -- 发布时间:2020/2/3 12:21:00 -- 请问如何写这个代码呢,我单击后,没有对应选中表和行啊 |
||||
-- 作者:有点蓝 -- 发布时间:2020/2/3 13:47:00 -- RowSelectionChanged事件 If e.Row.Selected Then Dim n As String = "表" & e.Row.Group.SubString(1,1) Dim rg As WinForm.RecordGrid = e.Form.Controls("RecordGrid1") If rg.Table Is Nothing OrElse rg.Table.Name <> n Then rg.Table = Tables(n) \'指定绑定表 rg.Build() End If Dim r As Integer = Tables(n).FindRow("第一列=\'" & e.Row.Text & "\'") If r > -1 Then Tables(n).Position = r End If End If |