Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - validating empty cell on Value changed ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

validating empty cell on Value changed ?

 Post Reply Post Reply
Author
Message
BoboP View Drop Down
Groupie
Groupie


Joined: 21 March 2008
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote BoboP Quote  Post ReplyReply Direct Link To This Post Topic: validating empty cell on Value changed ?
    Posted: 25 June 2008 at 3:31am
Hi !
I used values changed event to identify if cell value is empty . But if cell value is empty and it looses its focus , values changed event does not get fired.
It fires only if you types something.
Now my problem id prevent user from keeping some cells empty . How to do that

Help !
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 25 June 2008 at 4:29am
Hi,
 
Add items with default values. User knows what to enter (value or chars) and you don't have to check the empty fields. You only have to check if an item has been changed.
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
BoboP View Drop Down
Groupie
Groupie


Joined: 21 March 2008
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote BoboP Quote  Post ReplyReply Direct Link To This Post Posted: 25 June 2008 at 6:06am
Hi,

Thanks for replying..
I can give default values but is there any other way , we can check for mandatory fields ? And warn user for empty fields?


Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 25 June 2008 at 6:56am
Hi,
 
Private Sub wndPropertyGridFiles_AfterEdit(ByVal Item As XtremePropertyGrid.IPropertyGridItem, NewValue As String, Cancel As Boolean)
    If NewValue = Empty Then
        MsgBox "This field is required, cannot be empty"
        Cancel = False ' I would expect this to work but it isn't :(
    End If
End Sub
 
This event fires also when no value or same value is entered. But it should be selected again if cancel = false. I ask myself what the purpose of cancel in this event is
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.