|
-
Nov 14th, 2000, 11:06 AM
#1
Thread Starter
New Member
When i am editing the row for a grid(i.e. while entering values in the grid) i want to validate it. if i find value to be inapropriate i shall not accept it. hence give the user chance to enter valid data. can u explain this with sample piece of code? that would be helpful!!
Also for a particular column how to fix its length
i.e if column i want to set maxlength=6 character how to do it using data grid.
---thanks MIKEHOST
[Edited by diwakar on 11-17-2000 at 04:21 AM]
-
Nov 14th, 2000, 12:19 PM
#2
Addicted Member
I'm not sure if I understand what you are asking here, but if you are wanting to make sure that the data in your datagrid is valid, you can validate that data just like you would any database field. You reference the recordset through the ADO control just like the Grid does.
If adoDgrd.Recordset!Age < 18 then
msgbox "Invalid DataGrid Age"
EndIf
There is also an OnAddNew method that come in handy for validating new records.
hth
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|