MobileForms Toolkit Documentation

AdvancedList.CellClick Event

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

public event CellEventHandler CellClick;

Remarks

Occurs when the cell in the row of the control is clicked. When row is not selected, the CellClick event will not occur. If SelectionMode is SelectionMode.SelectDeselect, the CellClick event is not invoked (the RowSelect 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 AdvancedList1_CellClick(ByVal sender As Object, ByVal e As Resco.Controls.CellEventArgs)_
 Handles AdvancedList1.CellClick
    ' Handle the cell click event, in this case we check 
    ' whether the shopping cart ImageCell was clicked
    If e.DataRow.CurrentTemplateIndex = 2 Then
        Select Case e.CellIndex
            Case 1 ' Shopping cart
                OrderForm.Show(e.DataRow["id"])
        End Select
    End If
End Sub
            
[C#]

private void advancedList1_CellClick(object sender, Resco.Controls.CellEventArgs e)
{
    // Handle the cell click event, in this case we check 
    // whether the shopping cart ImageCell was clicked
    if (e.DataRow.CurrentTemplateIndex == 2)
    {
        switch (e.CellIndex)
        {
            case 1: // Shopping cart
                OrderForm.Show(e.DataRow["id"]);
                break;
        }
    }
}
            

See Also

AdvancedList Class | Resco.Controls.AdvancedList Namespace