|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
User Data Validation in a Datagrid.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 wrote:
Show quoteHide quote >I have a datagrid linked to one table using dataAdaptor via the following code: You could use the ColumnChanged event on the datatable, berify it is the > >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. > > column that is restricted, and test for the valid values. T |
|||||||||||||||||||||||