Howdy using winforms vs2008.
I want to be able to use a slightly customized datagridview, but I canβt think how to do it.
I have 1. sqldataadaptor populate a dataset 2. a binding source bound to a data set 3 a datagridview with a binding source set as the data source.
I want the binding to allow synchronization between the dataset and datagridview, so I can edit the data and then update the database using sqldataadaptor. update.
I want to show some custom columns that are calculated results. And I want to show the last bottom row, which is the result of all the columns in the DVG.
My problem is when the DGV is bound, I cannot add a custom column or row, this will not allow me. I know that I can add it directly to the data set, which is the basic data source, but then, having changed the structure of the data set, I can not update the database after the changes have been made.
or can i
Can someone tell me how I can add my own columns and the final common row to the associated DGV.
Also, while im here, if I click on the top of the column to sort by it in the associated DGV, will it also re-sort the underlying dataset, so that I would still edit everything while remaining in sync?
in advance for any help
source share