|
public MainPage()
{
InitializeComponent();
dataGrid.GridTapped += DataGrid_GridTapped;
dataGrid.GridDoubleTapped += DataGrid_GridDoubleTapped;
}
private void DataGrid_GridDoubleTapped(object sender, GridDoubleTappedEventArgs e)
{
//Changing the CellValue when double tapping the particular cell
if (e.RowColumnIndex.RowIndex==2 && e.RowColumnIndex.ColumnIndex==3)
viewModel.OrdersInfo[1].LastName = "X";
//Changing the CellValue when double tapping the grid.
// viewModel.OrdersInfo[5].LastName = "X";
}
private void DataGrid_GridTapped(object sender, GridTappedEventArgs e)
{
//Changing the CellValue when tapping the particular cell
if (e.RowColumnIndex.RowIndex == 2 && e.RowColumnIndex.ColumnIndex == 3)
viewModel.OrdersInfo[1].LastName = "/";
//Changing the CellValue when single tapping the grid.
// viewModel.OrdersInfo[5].LastName = "/";
} |
|
string value = null;
private void DataGrid_GridDoubleTapped(object sender, GridDoubleTappedEventArgs e)
{
//Changing the CellValue when double tapping the particular cell
if (e.RowColumnIndex.RowIndex==2 && e.RowColumnIndex.ColumnIndex==3)
{
if (viewModel.OrdersInfo[1].LastName == "X" || value == "X")
{
viewModel.OrdersInfo[1].LastName = "XX";
}
else
viewModel.OrdersInfo[1].LastName = "X";
}
value = viewModel.OrdersInfo[1].LastName;
//Changing the CellValue when double tapping the grid.
// viewModel.OrdersInfo[5].LastName = "X";
} |