CB
Clay Burch
Syncfusion Team
June 1, 2002 08:26 AM UTC
You have to add the rows to the underlying datasource. If the datagrid's datasource is a datatable, then code such as this should append rows.
DataTable dt = (DataTable) this.dataGrid1.DataSource;
//if table has two text columns
dt.Rows.Add(new object[] {"Blah1", "Blah2"});
dt.AcceptChanges();
To selectively have single row selection, you could add a bool property to the derive datagrid, and text this property in the two mouse overrides. If this property is true, execute the code that is there now. If this property is false, just call the base class for each of the mouse overrides. This should return the functionality to the default selection behavior.