Event: EventValSet for XTable

DIAdem 2018 Help

Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)

DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Triggers in user dialog boxes to save the value of a cell of the extended table.

EventValSet(ByRef This, Row, Col, ByRef Cell)
This Object that triggers this event.
Row Specifies the row number of the cell.
The row 0 contains the column header type Text. The actual data of the extended table start at line 1.
Col Specifies the column number of the cell.
Column 0 contains the type Text for the line text. The actual data of the extended table start in column 1.
Cell Control that is assigned to the cell.
You can use all the properties and methods of the control.
For this parameter you can use CodeCompletion within the event procedure.
Note  Use the dialog box Configure columns to determine the type of the control that is assigned to the column with the number Col. To open this dialog box, select the extended table in the dialog editor and click Columns on the Properties tab. You can assign the following types of controls to a column: Button, CheckBox, ChnComboBox, ChnListBox, ComboBox, EditBox, ListBox and Text. Refer to the the DIAdem Help for information on the properties and methods of these controls. The control properties, which you also can set in the Cell type dialog box of the extended table, are identified accordingly in the DIAdem help.

The following example converts the text of the input field assigned to the row into a number and assigns a channel row to this number:

Sub XTable1_EventValGet(ByRef This, Row, Col, ByRef Cell, IsInputCell)
  If Row = 0 Then
    If Col <> 0 Then
      Cell.Text = Data.Root.ActiveChannelGroup.Channels(Col).Name
      Cell.Text = ""
    End If
    Select Case Col
    Case 0
      Cell.Text = Row
    Case Else
      If IsInputCell Then
        Cell.Text = Str(Data.Root.ActiveChannelGroup.Channels(Col).Values(Row))
        Cell.Text = Str(Data.Root.ActiveChannelGroup.Channels(Col).Values(Row),"d.d")
      End If
    End Select 
  End If
End Sub 

Sub XTable1_EventValSet(ByRef This, Row, Col, ByRef Cell) 'Generated event handler
  If (Row > 0) And (Col > 0) Then
    Data.Root.ActiveChannelGroup.Channels(Col).Values(Row) = Val(Eval(Cell.Text))
  End If
End Sub


Not Helpful