1

Help implement with Tableview. The tableview is populated with switch cells through a loop under C #. I can not make a selection of those cells where switchbox would be included.

<TableView   x:Name="tableView1" 
                         Intent="Data" 
                         VerticalOptions="FillAndExpand">
                <TableRoot>
                    <TableSection x:Name="LabSelection1" 
                                  Title="select needed detail"/>
                </TableRoot>
            </TableView>

C#:

LabSelection1.Clear();
            for(int i=0; i<15; i++)
            {
                SwitchCell cell = new SwitchCell();
                cell.Text = "DEV"+i;
                cell.On = false;
                LabSelection1.Add(cell);
            }

was in winforms through foreach select in selectlistbox. Is there such a thing on tableview, and how to implement it?

1 Answers1

0

Solved.

foreach (SwitchCell cell in LabSelection1)
{
  if(cell.On == true) { DisplayAlert("" + cell, "YES "+cell.Text, "OK"); }
  else DisplayAlert("" + cell, "NO", "OK");
}