473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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.
Jun 16 '06 #1
1 964
marcmc wrote:
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
Jun 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: lucas | last post by:
Hi, I have a simple input form that i use to add records to a sql server database. Bellow that is a datagrid that has one template column that I use to dispaly the 3 fields with some html...
5
by: Chamindu R Munasinghe | last post by:
Hi, I use the asp.net datagrid footer to add new records. In the footer I use a web user control to read a date. it is made of a text box, a required field validator and a compare validator. When...
3
by: Ben | last post by:
Hi, I have a page with a datagrid that you have to scroll to see. I'm using the StrengthControls SmartScroller as recommended to maintain my scroll position. Anyway, inside the datagrid I have...
2
by: rodchar | last post by:
Hey all, I've got an asp.net page that has a textbox on it. The textbox has a requiredfieldvalidation associated with it. I've also got a datagrid with the edit,update,cancel links on it. When...
5
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and...
4
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
5
by: Tina | last post by:
the Edit, Update, Cancel, and Delete buttons in my datagrid are causing validation elsewhere on the page. I want to specify that these buttons should not cause validation but they have no design...
2
by: ticars | last post by:
I have a telephone number user control in which I need to validate the data entered (Required field validation and regular expression validation). The phone number is represented as 3 text boxes...
0
by: dhurwitz | last post by:
Hi, In my ASP.NET 2.0 web app, I have a user control, ucBinEdges, with several text boxes. The user control has several validation controls validating the Text of these text boxes -...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.