User Data Validation in a Datagrid.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a datagrid linked to one table using dataAdaptor via the following code:

Try
SqlDataAdapter1.Fill(DataSet11)
dgThreshold.DataSource = DataSet11.DefaultViewManager
Catch ex As Exception
MessageBox.Show("Could not connect to Dataset/Database")
End Try

Field index 4 can only have a Y or N enetered by users.
How can I ensure this?

I have been messing with the properties within the following to no avail.

DataSet11.MISRE_Threshold.Columns(4).

Note: the 'Unique' preoperty suggests that the namespace allows iteration
through a columns data, surely the .Text property is not too far away.
 
marcmc said:
I have a datagrid linked to one table using dataAdaptor via the following code:

Try
SqlDataAdapter1.Fill(DataSet11)
dgThreshold.DataSource = DataSet11.DefaultViewManager
Catch ex As Exception
MessageBox.Show("Could not connect to Dataset/Database")
End Try

Field index 4 can only have a Y or N enetered by users.
How can I ensure this?

I have been messing with the properties within the following to no avail.

DataSet11.MISRE_Threshold.Columns(4).

Note: the 'Unique' preoperty suggests that the namespace allows iteration
through a columns data, surely the .Text property is not too far away.
You could use the ColumnChanged event on the datatable, berify it is the
column that is restricted, and test for the valid values.

T
 
Back
Top