Hi
Doesn't the grid that you create, create its own datatable that you can use in the program, meaning for a update code that i want to use with my datagrid i need a datable, but that means i have to create dataset and sql queries and everything, doesn't the grid have the sql queries already?
-
private void gridControl1_EmbeddedNavigator_Click(object sender, EventArgs e)
-
{
-
-
if (MessageBox.Show("Do you want to add this row", "Confirm deletion",
-
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) != DialogResult.Yes)
-
// e.Handled = true;
-
//if (e.Handled == true)
-
//{
-
UpdateDatasource(gridControl1);
-
//}
-
-
}
-
-
public void UpdateDatasource(GridControl grid)
-
{
-
//Save the latest changes to the bound DataTable
-
ColumnView View = (ColumnView)grid.FocusedView;
-
if (!(gridView1.PostEditor() && View.UpdateCurrentRow())) return;
-
DataTable dtReport = new DataTable();
-
//Update the database's Suppliers table to which oleDBDataAdapter1 is connected
-
DoUpdate(qx_AssetInventoryTableAdapter, what do i use here??);
-
//Update the database's Products table to which the oleDbDataAdapter2 is connected
-
-
}
-
-
public void DoUpdate(DbDataAdapter dataAdapter, System.Data.DataTable dataTable)
-
{
-
try
-
{
-
dataAdapter.Update(dataTable);
-
}
-
catch (Exception ex)
-
{
-
MessageBox.Show(ex.Message);
-
}
-
}
-