I have an app using Devexpress controls, xtragrids and chkboxlists
I have a dataset containing few tables, some of whose data goes to grid and some to list.
List data is dependent on grid row selection.
I load the whole dataset from DB (not very large) at start once, then use it as cache for GUI.
I need to have Add/Edit/Delete functionality for grid and list of items (include/exclude pattern).
Should i maintain my own structure to hold the changes, and should i manually recreate and change dataSource whenever there is edit ?
Or is going through dataSet acceptchanges is better (not touching DataSource again).
And how to approach the DB update ? DbAdapter.UpdateChanges ? is it good way or what is the standard pattern.
EDIT
Not fully sure, but is it ont he lines of MVC MVVM patterns ?
I think its better ‘not’ to edit operations on the grid itself. Not a good user experience. And most of the times its not possible to display all the columns in the grid. They are just too many.
You can easily attach a Property Grid Control to a gridrow.
When a user clicks on a row, the PGC will load the row data automatically.
I would suggest having three buttons Save/New/Delete below the PGC. Each button tied to a stored procedure call in database.