扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
字段名 | 字段 | 类型说明 |
ID | 自动编号 | Key |
Code | String | 编码 |
Name | String | 名称 |
PID | Int | 父结点的ID |
CPtr | boolean | 是否有子结点 |
属性名 | 类型 | 说明 |
Value | Object | Key |
PID | Object | 父结点的ID |
CPtr | Boolean | 是否有子结点 |
属性名 | 类型 | 说明 |
Datasource | dataview | dbTreeVIew的数据源使用dataview,而不是object |
Value | Member | string值成员(数据源[dataview]的列名) |
Display | Member | string显示(在Text中)成员 |
Pid | Member | string父ID成员 |
CPtr | Member | string是否有子结点 |
Protected Property DataSource() As Object Get Return mDataView End Get Set(ByVal Value As Object) If Value Is Nothing Then Else mDataView = Value cm = CType(Me.BindingContext(mDataView), CurrencyManager) UpdateTreeView() End If End Set End Property Protected Property PidMember() As String Get Return mPidMember End Get Set(ByVal Value As String) mPidMember = Value End Set End Property Protected Property DisplayMember() As String Get Return Join(mDisplayMember, SplitChar) End Get Set(ByVal Value As String) mDisplayMember = Split(Value, SplitChar) End Set End Property '注意,这几个属性都是保护成员,必须在Init事件中设置: Public Sub Init(ByVal dispmember As String, ByVal valuemember As String, ByVal pidmember As String, ByVal cptrmember As String, ByVal datasource As DataView) Me.ValueMember = valuemember Me.DisplayMember = dispmember Me.PidMember = pidmember Me.CPtrMember = cptrmember Me.DataSource = datasource '取value最大值,新增时将value+1,保证关健值唯一。 Me.mDataView.Sort = Me.ValueMember Me.m_MaxID = Me.GetValue(Me.mDataView.Count - 1) End Sub |
Protected Overridable Function GetDisplay(ByVal Index As Integer) As Object Dim i As Integer Dim temp As String = "" For i = 0 To mDisplayMember.Length - 1 temp = temp & IIf(i > 0, LinkChar, "") & mDataView(Index)(mDisplayMember(i)) Next Return temp End Function |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者