Home All Groups Group Topic Archive Search About

Initialize user aded row in a DataGridView

Author
17 Feb 2006 12:12 PM
scorredoira
Hi,

which is the standard way to initialize a typed dataset row with Guid
and DateTime columns when the user adds a new row in a bound
datagridView by clicking in the last row?

I can not set default values for some columns in the typed dataTable
because they are Guid's and DateTimes.
I can not do it in the rowChanged event either because before it fires
the datagridview throws an exception "The column xxx can not be null".

I am catching now the grid's UserAddedRow event, but It gives a
reference to the DataGridViewRow and I can't get the underlying row to
initialize it, so in the event I have to get the bindingSource.Current
object wich uses to be the DataRow, but not allways!

thank you

AddThis Social Bookmark Button