DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and Drop with XTable

Solved!
Go to solution

Hi,

 

is there a way to enable Drag and Drop from the data portal in an XTable-ChnComboBox-Column?Just like in a normal ChnComboBox.

 

With best regards,

Martin

0 Kudos
Message 1 of 2
(4,962 Views)
Solution
Accepted by topic author MartinKozlowski

I found something 🙂

 

'do something with the dropped channel
Sub XTable1_EventDrop(ByRef This, Row, Col, DropInformation) 'Erzeugter Event-Handler
Dim oDropElement

  For Each oDropElement In DropInformation.DiademElements
    'put here some code for updateing table
    Call MsgBox(oDropElement.ChannelGroup.Name & "/" & oDropElement.Name)
  Next
End Sub

'enable drop for one channel in col 2
Sub XTable1_EventDropAllowed(ByRef This, Row, Col, DropInformation, ByRef DropEffect) 'Erzeugter Event-Handler
Dim oDropElement
  
  If (Col = 2) AND (DropInformation.DiademElements.Count = 1) Then
    For Each oDropElement In DropInformation.DiademElements
      If oDropElement.IsKindOf(eDataChannel) Then
        DropEffect = 1
      End If      
    Next
  End If
End Sub

 

Message 2 of 2
(4,957 Views)