the point is I'm using the same method somewhere else and that works fine.
but this time when i press Add button an object is added and datagrid updates correctly but from the second item added to collection datagrid does not update anymore. I wanted to refresh my datagrid itemssource in code behind, and nothing updated.
I have a generic list and I want to bind this collection to my datagrid data source every time an object is being added to the collection.
and I'm not interested to use observable collection.
After entering data into all the textbox, and after clicking the submit button, it won't immediately show in the datagridview, I need to reopen the form in order to see the new inserted row.
Make sure you use the data type that your are getting the data from to get the latest data values.
Note: Due to the size or complexity of this submission, the author has submitted it as a file to shorten your download time.
If you reload data into your Data Table it will reflect in the Data Grid Automatically.
cmd = new Ole Db Command("insert into FWINFOS (ID, Name, Gender, Date Of Birth, Race, Working Place, Passport NO, Date Of Expire,[Position], Photo) values('" text Box5.