473,386 Members | 1,720 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,386 software developers and data experts.

Validate msflexgrid's cells

Just another msflexgrid's topic..

does anyone know how to validate the cell from msflexgrid?

for example i want to validate the column(3) if it's not numeric (after editing) then it would disable moving to other cells until it completely fulfill the condition.

Here's my code
Expand|Select|Wrap|Line Numbers
  1. Private Sub MSFlexGrid1_LeaveCell()
  2. For i = 1 To MSFlexGrid1.Rows - 2
  3. If IsNumeric(MSFlexGrid1.TextMatrix(i, 3)) Then
  4.     MSFlexGrid1.CellBackColor = &H80000005 
  5. Else
  6.     MsgBox "data invalid"
  7. End If
  8. Next
  9. End Sub
It works but it wont disable the movement when i typed data that is not numeric =(
Jan 10 '08 #1
3 2737
CyberSoftHari
487 Expert 256MB
Did you tried it in Grid_KeyUp event ?
Jan 10 '08 #2
Did you tried it in Grid_KeyUp event ?
yup but it wont work though..
Jan 10 '08 #3
QVeen72
1,445 Expert 1GB
Hi,

Writing code in LeaveCell doesnt stop moving to the next cell..
All you can do is Just before Saving, Do a Through Checking of the Column..

Or else Place TextBox on the Grid Cell To Enter Data, and write code in TextBox's Validate event..


REgards
Veena
Jan 10 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: rv daffin | last post by:
I need to clear the grid between updates without clearing the header row. What is the speediest way to do this? Thanks for your time. -- Dink - There are 10 kinds of people in the world......
0
by: Martin K | last post by:
Hello all..thanks for everyone's advice regarding my SHBrowseForFolder API problem, I was able to put together a public class that runs great! But I have another migration headache regarding the...
0
by: Martin K | last post by:
Hello all..thanks for everyone's advice regarding my SHBrowseForFolder API problem, I was able to put together a public class that runs great! But I have another migration headache regarding the...
0
by: Martin K | last post by:
Hello all..thanks for everyone's advice regarding my SHBrowseForFolder API problem, I was able to put together a public class that runs great! But I have another migration headache regarding the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.