I am using DevExpress in my winform application, I have a gridview, data entry form, datanavigator, all bound to dataset.
I want to add new record, if using datanavigator “Add” it works good, how to do the same using a “New Record” button?
BindingSource.AddNew()
is not working, it usually does, but with devexpress its not working.
If you want to use binding then use your objects with binding source..
and use the binding list
.AddingNew += new AddingNewEventHandler(listOfParts_AddingNew);event to add new entity object ..
See the example of BindingList on MSDN.
DevExpress WinForm Controls works so fast with binding sources as compare to typed datasources etc… YOu can implement bindingSources using these example..
set gridview and the associcated controls datasource to bindsouce that you have created…
process your form with the this MSDN example..
have a look on this code snippet.. may be you will get some idea from this..
Here I am using
BindingListas datasouceBindingList<Emp> listofEmp;and on the place of grid listing of records are shown in a listbox control.. but all same…try this with your gridview..