Exemple #1
0
 public void FormatCell(ICellHandler cell, sw.FrameworkElement element, swc.DataGridCell gridcell, object dataItem)
 {
     if (GridHandler != null)
     {
         GridHandler.FormatCell(this, cell, element, gridcell, dataItem);
     }
 }
Exemple #2
0
        public void CellEdited(ICellHandler cell, sw.FrameworkElement element)
        {
            var dataCell = element.GetVisualParent <swc.DataGridCell>();
            var dataRow  = element.GetVisualParent <swc.DataGridRow>();
            var row      = dataRow.GetIndex();
            var dataItem = element.DataContext;

            GridHandler.CellEdited(row, dataCell.Column, dataItem);
        }
Exemple #3
0
        public void CellEdited(ICellHandler cell, sw.FrameworkElement element)
        {
            var dataCell = element.GetVisualParent <swc.DataGridCell>();
            var dataRow  = element.GetVisualParent <swc.DataGridRow>();

            // These can sometimes be null, but I'm not exactly sure why
            // It could possibly be if another event occurs to refresh the data before this call?
            // either way, if we aren't part of a row/cell, just don't raise the event.
            if (dataRow == null || dataCell == null)
            {
                return;
            }
            var row      = dataRow.GetIndex();
            var dataItem = element.DataContext;

            GridHandler.CellEdited(row, dataCell.Column, dataItem);
        }
Exemple #4
0
 public sw.FrameworkElement SetupCell(ICellHandler handler, sw.FrameworkElement defaultContent, swc.DataGridCell cell)
 {
     return(GridHandler != null?GridHandler.SetupCell(this, defaultContent, cell) : defaultContent);
 }
Exemple #5
0
 public sw.FrameworkElement SetupCell(ICellHandler cell, sw.FrameworkElement defaultContent)
 {
     return(GridHandler != null?GridHandler.SetupCell(this, defaultContent) : defaultContent);
 }