For Example:
ultragrid.Rows(i).Cells(0).Value = DBNull.Value
or
ultragrid.Rows(i).Cells(0).Value = Nothing
--
From the above, Which will u recommend to use it?
If i set 'Nothing' then it creating Exception for the first row of the grid. For the other rows it works fine.
The System.Data.DataColumn class exposes an AllowDBNull property which determines whether that column supports null values. If you are bound to a DataTable, your problem is most likely related to this.
'Nothing' is the VB equivalent to null in C#, and is different from DBNull.Value. Again, if you are bound to a DataTable you usually use DBNull.Value as opposed to null.
Note that UltraGridColumn exposes a Nullable property which determines how the grid interprets the act of clearing a cell's value.