Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
725
Row of the grid and DataSource
posted

In a UltraGrid (Infragistics.Win.UltraWinGrid.UltraGrid), how can I know if the selected row has been updated in the DataSource associated of the grid?

I try to insert a row but when you update the DataSet associated with the grid (pAdapterArt.Update (pDataSet, table)) generate error for example by primary key duplicate, so the record is not inserted.

Later, How can I identify that the row selected has been updated in a DataSet of the grid or not?

Thank you

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    I'm not exactly sure what you are asking.

    There are two layers of updating that take place when you use a grid or other bound control. The first layer is between the grid and it's DataSource. Changes made in the grid are written to the DataSource depending on the UpdateMode property. By default, it happens whenever the grid loses focus or the focus leaves a grid cell.

    The second layer is between the grid's DataSource and the back end. The grid has no role in this process. If you are using a DataSet, then the DataSet itself tracks all changes that are made to it, and the DataAdapter class is intended to help you to write those changes back to the database.

    It sounds like the problem here is between the DataSet, DataAdapter, and the back end. So your best bet for assistance with something like that is Microsoft's documentation, since as I said, he grid plays no role in that part of things.

    You probably have to use some kind of fake primary key in your DataSet/DataTable and then correct the key when you get a real key from the DataBase.

Children