Hi!
I have an editable grid that allows new rows. The grid is bound to an EntityCollection<MyEntity> of entity framework. By default the grid initializes a new instance of MyEntity when the user clicks on the new row. What I want to do is to create that instance myself using my own code and then provide that instance to the grid.
Is this possible?
Whether you can do this or not depends on the amount of control that you have with your data source. The grid will use the .NET BindingManager's AddNew method if you are using an IBindingList (I'm not familiar with EntityCollection<T>), which will call the AddNew method on the IBindingList, so I guess you could trap whether you're between the BeforeRowInsert and AfterRowInsert events of the grid and return a new row of your own choosing at that point. Since adding isn't generally supported without an IBindingList, I'm assuming that this approach applies to your implementation.
-Matt