Print Page | Close Window

Numbers xtpEditStyleNumber

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16596
Printed Date: 15 November 2024 at 8:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Numbers xtpEditStyleNumber
Posted By: markmark
Subject: Numbers xtpEditStyleNumber
Date Posted: 15 April 2010 at 8:45am
Hi
 
I am using this code
 
    Set Item = rRecord.AddItem("")
    Item.CreateEditOptions
    Item.EditOptions.EditControlStyle = xtpEditStyleNumber
 
This allows only numbers, but I would like to be able to enter values with a decimal point ie 12.123
But it only allows whole numbers, is there away to do this?
 
Thanks
 
Mark


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0



Replies:
Posted By: jpbro
Date Posted: 15 April 2010 at 10:11am
You can use the InplaceEditChanging event along the lines of this:


Private Sub repServers_InplaceEditChanging(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, NewValue As String, Cancel As Boolean)
    If Len(NewValue) <> 0 Then
         Cancel = Not IsNumeric(NewValue)
    End If
End Sub


Although that would allow currency symbols as well (and negative values). You can expand your testing as required if you don't want to allow such values.




-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: markmark
Date Posted: 15 April 2010 at 10:59am
Thanks jpbro that works for me.
 
Cheers


-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0


Posted By: jpbro
Date Posted: 15 April 2010 at 1:35pm
Glad to help!

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net