User Data Validation in a Datagrid.

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.
 
T

tomb

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top