DatagridviewRow missing DataBoundItem

G

Guest

Ok, i have some biz objects bound to a datagridview. The datagridview has
AllowUserToAddRows/delete set to true. This means that the datagridview gets
an empty row when it recieves focus. The empty row has its DataBoundItem
property set to false, which i find kinda strange since the biz object
BindingList AddNew event is called prior to the row being added (when the
datagridview recieves focus). Now, if i set a value on the new row
programatically through the DataGridViewCells, the changes are not commited
to the underlying BindingList and the DataBoundProperty remains null. If i do
this through the GUI, the DataBoundProperty seems to be set when a edited
cell loses focus. I've tried calling BeginEdit(true);
//set value
EndEdit;
but this doesn't do the trick. If anyone knows how to commit
datagridviewcell changes so that the DataBoundItem on the owner row is set,
i've would gladly like to hear from you! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top