I would ideally just save only the changed rows and new rows in the database. There is not anyway to get the changed rows from the datagridviews row collection.
And how would I identify the values which have been added fresh to the datagrid. I guess you could check the cells value with the formattedvalue in the cells validating event.
I did some research on adding a custom control, but there is very little documentaion for this and not many examples. For my eg, I thought about exposing the On Text Changed event and then letting the Custom Editing Control overriding that On Text Changed Event.
With so many records getting populated in the combobox on the datagridview slowed the datagrid to an exruciating slow speed. Forms;namespace Windows Application1Hi Ken, Thanks for your prompt reply again.
I lose the value which I have searched in the text box and selected the desired value from the drop down. The stored proc sp Get Company is just retrieving the descriptions of companies which matches the value entered in the text box.---------------------------------------using System;using System. But then when I save the form with the grid with multiple rows, how do I retrieve the Id values to save them in the Database Please help and thanks for your great help ! Hi Ken Again thanks for providing such an valuable support in the forum. I want to know how can I save the values changed in the cells by the user only if they have been changed meaning updated or added.
I don't want to loop through all the rows in the unbound datagridview and then save all the values in the DB.
Instead of Cell Parsing, try using Cell Validating with code similar to this in the handler: If e.
Cancel = True End If =============== Clay Burch Syncfusion, Inc.
To resolve this issue, I thought of writing a custom control which will have a text box and a drop down box next to it. I tried renaming the property value, it did not work.