I am trying to populate a textbox.text with a value with a record from a datagrid.
I can get my value from the datagrid by the following
Dim eRow As Integer



eRow = datagrid.CurrentRow.Index


txtSelecteditem.Text = datagrid.Item(0, eRow).Value

This all works fin when there is a value in the cell it is picking up. However, I hit a problem when this filed is blank.

The error I get is:
Conversion from type 'DBNull' to type 'String' is not valid.


How can I get the textbox to populate with null if the field is null.