MobileForms Toolkit Documentation

AdvancedTree.CellClick Event

Occurs when the cell in the selected node of the control is clicked.

public event CellEventHandler CellClick;

Remarks

Occurs when the cell in the node of the control is clicked. When node is not selected, the CellClick event will not occur. If SelectionMode is SelectionMode.SelectDeselect, the CellClick event is not invoked (the AfterNodeSelect event has priority, because the cells can be different in selected/normal template).

CellClick event has arguments of type CellEventArgs.

Example

CellClick event is used to invoke the order form, when image cell with the picture of shopping cart is clicked:

[Visual Basic]
      
Private Sub AdvancedTree1_CellClick(ByVal sender As Object, ByVal e As Resco.Controls.AdvancedTree.CellEventArgs)_
 Handles AdvancedTree1.CellClick
    ' Handle the cell click event, in this case we check 
    ' whether the shopping cart ImageCell was clicked
    If e.Node.CurrentTemplateIndex = 2 Then
        Select Case e.CellIndex
            Case 1 ' Shopping cart
                OrderForm.Show(e.Node["id"])
        End Select
    End If
End Sub
            
    
[C#]
      
private void advancedTree1_CellClick(object sender, Resco.Controls.AdvancedTree.CellEventArgs e)
{
    // Handle the cell click event, in this case we check 
    // whether the shopping cart ImageCell was clicked
    if (e.Node.CurrentTemplateIndex == 2)
    {
        switch (e.CellIndex)
        {
            case 1: // Shopping cart
                OrderForm.Show(e.Node["id"]);
                break;
        }
    }
}
            
    

See Also

AdvancedTree Class | Resco.Controls.AdvancedTree Namespace