datacolchanged事件
If e.DataCol.Name = "数据" Then
If e.NewValue = Nothing Then
e.DataRow("设备") = Nothing
e.DataRow("槽") = Nothing
e.DataRow("子槽") = Nothing
e.DataRow("端口") = Nothing
e.DataRow("外层") = Nothing
e.DataRow("内层") = Nothing
Else
Dim str As String = e.NewValue
Dim reg As new System.Text.RegularExpressions.Regex("(?<=\=+)[0-9]+(?=;+)")
Dim mc As Object = reg.matches(str)
e.DataRow("设备") = str.SubString(0,4)
e.DataRow("槽") = mc(0).Value
e.DataRow("子槽") = mc(1).Value
e.DataRow("端口") = mc(2).Value
e.DataRow("外层") = mc(3).Value
e.DataRow("内层") = mc(4).Value
End If
End If