Home Forums WinForms controls Xceed Grid for WinForms Overriding the binding value Reply To: Overriding the binding value

User (Old forums)
Member
Post count: 23064

If you don’t want the DataSet to which the grid is bound to be updated when changing the cell value, the only solution we can think of is to use a CellViewerManager on the column, and use the SettingControlValue event to set the value so the the cell itself always has the “true” value, but the viewer is set with a different value.

e.g.:

      gridControl1.Columns[ “column1” ].CellViewerManager.SettingControlValue += new CellViewerEventHandler( CellViewerManager_SettingControlValue );

    void CellViewerManager_SettingControlValue( object sender, CellViewerEventArgs e )
    {
      if( e.Cell.Value == “some value” )
        e.Control.Text = “Different value”;
    }

Imported from legacy forums. Posted by André (had 352 views)