private void DataGrid_CurrentCellValueChanged(object sender, Syncfusion.UI.Xaml.Grid.CurrentCellValueChangedEventArgs e)
        {
            SfDataGrid grid        = sender as SfDataGrid;
            int        columnindex = grid.ResolveToGridVisibleColumnIndex(e.RowColumnIndex.ColumnIndex);
            var        column      = grid.Columns[columnindex];

            if (column.GetType() == typeof(GridCheckBoxColumn) && column.MappingName == "IsDelivered")
            {
                var rowIndex = grid.ResolveToRecordIndex(e.RowColumnIndex.RowIndex);
                var record   = grid.View.Records[rowIndex].Data as OrderInfo;

                var value = record.IsDelivered;
            }
        }
Exemple #2
0
 private void DataGridCxC_CurrentCellValueChanged(object sender, Syncfusion.UI.Xaml.Grid.CurrentCellValueChangedEventArgs e)
 {
     try
     {
         SfDataGrid grid        = sender as SfDataGrid;
         int        columnindex = grid.ResolveToGridVisibleColumnIndex(e.RowColumnIndex.ColumnIndex);
         var        column      = grid.Columns[columnindex];
         if (column.GetType() == typeof(GridCheckBoxColumn))
         {
             DataRowView row   = (DataRowView)dataGridCxC.SelectedItems[0];
             string      id    = row["idrow"].ToString();
             int         check = Convert.ToInt32(row[columnindex]);
             string      query = "update NIRel_Niif set " + column.MappingName + "=" + check + " where idrow='" + id + "'";
             if (SiaWin.Func.SqlCRUD(query, idemp) == false)
             {
                 MessageBox.Show("Fallo la actualizacion de la tabla");
             }
         }
     }
     catch (Exception w)
     {
         MessageBox.Show("error al #30000:" + w);
     }
 }
        void AssosciatedObject_CurrentCellValueChanged(object sender, Syncfusion.UI.Xaml.Grid.CurrentCellValueChangedEventArgs args)
        {
            int columnIndex = this.AssociatedObject.ResolveToGridVisibleColumnIndex(args.RowColumnIndex.ColumnIndex);

            this.AssociatedObject.GetValidationHelper().SetCurrentRowValidated(false);
        }