It looks like you are completely replacing the DataSource property which will tell the control to completely re-render.
Add the new row to the existing DataSource and then call the Refresh()
method.
On the other-hand if you are using WPF move away from using DataTable
and start using an ObservableCollection<T>
instead.
private void btn_update_Click(object sender, EventArgs e)
{
var myOriginalDataSource = gridControl1.DataSource;
var dr = myOriginalDataSource.NewRow();
dr["id"] = 1;
dr["name"] = "Gelen Havale";
dr["lname"] = "Gelen Havale";
gridControl1.Refresh();
}
The Refresh()
is psudocode as I don't know the DevExpress WinForms controls very well.