Note that this will access the value to which the cell is bound if the it is in a bound column. This will not necessarily be what's displayed. For instance, if the cell is in a ComboBox column and you've set the column's DataSource, DisplayMember and ValueMember, the Value property of the cell will come from the ValueMember while the actual displayed value comes from the DisplayMember and would be accessed via the cell's FormattedValue property.
What's the data source for your BindingSource? If it's a DataTable then you should set the DefaultValue property of the DataColumn that maps to that column in the grid. Otherwise you could handle the UserAddedRow event of the grid and set the Value of the desired cell. That's untested mind you, but it seems like it would be sound.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.