Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - ReportControl Constraints and Editing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportControl Constraints and Editing

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: ReportControl Constraints and Editing
    Posted: 29 November 2011 at 7:21pm
I have some additional questions/issues with ReportControl constraints and editing.

In the documentation for the ReportRecordItemEditOptions object:


ConstraintEdit Property

Description

Specifies whether data not declared in the list of constraints can be entered into the edit box.

Remarks

If True, then you can only choose from the list of constraints added.

If False, then you can type a custom response not listed in the list of constraints.



AND


AllowEdit Property

Description

Specifies whether an Edit control is used for the item.

Remarks

If an edit control is not used, the user can still change the value throught a combo box



I'd like to have a fixed dropped-down list of items in a column of a ReportControl.

If I add constraints to a column like this:


      With Me.ReportControl1.Columns.Add(.Columns.Count, "Test", 200, True)
         With .EditOptions
            .AddComboButton True
            .ConstraintEdit = False
            .AllowEdit = True
            .Constraints.Add "Disabled", 0
            .Constraints.Add "Enabled", 1
            .Constraints.Add "Enabled (Read-Only)", 2
         End With
      End With


I can pick from a list, but the constraint text is not replacing the underlying value of the cell (instead of seeing Disabled, Enabled, etc... I'm seeing 0, 1, 2 in my cells).

If I use .ConstraintEdit = True, .AllowEdit = True, then the values are translated to the constraint text properly, but the user gets an edit box for the constraint after clicking the drop-down button.

If I use .ConstraintEdit = False, .AllowEdit = False, then the values are not translated to the constraint text properly, and the cell values cannot be changed (no drop down button).

If I use .ConstraintEdit = False, .AllowEdit = True, then users can apparently pick something from the drop-down menu, but it doesn't change the underyling value of the control. The values are also not translated to the constraint text (I just see the original value).

Is there a way to get this to behave like a uneditable drop-down list with values translated to constraint text for all of the cells?

Is there any circumstance when the underlying values should not be translated to the matching constraint text?


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

Language: Visual Basic 6.0 SP6

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: 03 December 2011 at 1:14pm
Hi Jason,
 
As I said before, with V13.4 it worked like you (and I) want. Here's reply of that post:
 
 
 
 
Hi,
 
I had to give it a try with V13.4.2
Well to be honest, it's working as should Wink
 
If you allow your users to edit the 'cell', the edit portion has to be selected, right? If you only allow user to select one of the options inside combo, you have to set .AllowEdit = False. This forces the combo to be visible. If entire column should do same set values in Column collection
 
With Me.wndReportControlStatus
        .AllowEdit = True                           'Should be True otherwise you can edit anything
       
        With .PaintManager
            .ShowNonActiveInPlaceButton = True
        End With
       
        With .Columns
            With .Add(0, "Column 1", 100, True)
                With .EditOptions
                    .AllowEdit = False             'Only set if you allow typing in 'cell'
                    .ConstraintEdit = True      'Should be True otherwise your selected value from combo isn't set
                    .AddComboButton True
                    .Constraints.Add "Item 1", 1
                    .Constraints.Add "Item 2", 2
                    .Constraints.Add "Item 3", 3
                End With
            End With
        End With
       
        Dim i As Integer
        For i = 1 To 2
            With .Records.Add
                .AddItem 1
                .AddItem "Some value"
            End With
        Next i
       
        .Populate
    
End With
 
 
Andre? Please reply...
 
 
 
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
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 05 December 2011 at 8:20am
Hi Aaron, thanks for the reply, I might have missed it previously due to the forum moderation - sometimes posts seem to get approved a few days later, but then don't show up as bolded/unread messages when I come to the forum.

Just a quick question for you about 13.4 - if you have .ConstraintEdit = True, are you able to type into the combobox? What about .ConstraintEdit = False - does the cursor still appear in the combobox, or does the combo not get focus?

I'm hoping for a locked list that can't get cursor focus, like when a VB ComboBox.Style = vbComboDropdownList.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 05 December 2011 at 12:26pm
Originally posted by jpbro jpbro wrote:

Hi Aaron, thanks for the reply, I might have missed it previously due to the forum moderation - sometimes posts seem to get approved a few days later, but then don't show up as bolded/unread messages when I come to the forum.

Just a quick question for you about 13.4 - if you have .ConstraintEdit = True, are you able to type into the combobox? What about .ConstraintEdit = False - does the cursor still appear in the combobox, or does the combo not get focus?

I'm hoping for a locked list that can't get cursor focus, like when a VB ComboBox.Style = vbComboDropdownList.
Hi Jason
 
Just a quick question for you about 13.4 - if you have .ConstraintEdit = True, are you able to type into the combobox?
Yes, correct
does the cursor still appear in the combobox
No, it didn't
or does the combo not get focus?
It just dropped down the list, like you have with VB ComboBox.Style = vbComboDropdownList.
 
 
 
Andre: Why has this been changed in newer versions?
 
 
 
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
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: 05 December 2011 at 1:09pm
Originally posted by jpbro jpbro wrote:

Hi Aaron, thanks for the reply, I might have missed it previously due to the forum moderation - sometimes posts seem to get approved a few days later, but then don't show up as bolded/unread messages when I come to the forum.

Just a quick question for you about 13.4 - if you have .ConstraintEdit = True, are you able to type into the combobox? What about .ConstraintEdit = False - does the cursor still appear in the combobox, or does the combo not get focus?

I'm hoping for a locked list that can't get cursor focus, like when a VB ComboBox.Style = vbComboDropdownList.
 
Few days later??? Looks more like a week to me. In my opinion this forum has to be revived because it's almost "dead"... I don't understand why it's taking so long before it has been approved. After it has been approved, you have to wait a long time before it shows the reply so on and so on... Too bad, I liked this forum because you could share knowlegde with other members and at least be could discuss problems and opinions. By the time you see a reply you read entire help about certain issue and you found problem yourself Tongue
 
Well, hope CJ solves this problem as well because forum members will think same way as I do and don't visit forum anymore.
 
btw Guess this reply isn't going to be approved... Tongue
 
 
 
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
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 06 December 2011 at 1:07am
Hi,

this has been fixed for 15.2.1 which will be released shortly. Also everyone who opened a ticket got an update with the fix.

Also forum posts are approved at least 2 times a day.

Andre

Codejock support
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.