Checkbox + AllowEdit (Strange Behavour) |
Post Reply |
Author | ||
choochy
Groupie Joined: 27 October 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
Posted: 29 January 2010 at 8:42pm |
|
I have a report control setup with a couple of columns that I need to be just checkboxs, the rest of the columns are text. I have enabled editable on the report control and set any columns that I dont want to be editable as false. I have added the checkboxs (using Item.HasCheckbox = True) but this is where the functionality gets strange.
The checkbox itself works fine as a checkbox and tickes and untickes, however if u click next to the checkbox (still in the column) it goes in to text editing mode. Example:
From memory, the previous version didnt work like this. How can stop this behavour? I only want the checkbox to be edited and not the text within.
Thanks
Chris
|
||
Product: Xtreme SuitePro (ActiveX) version 13.4.2
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 & Delphi XE |
||
@lin
Groupie Joined: 20 September 2006 Status: Offline Points: 19 |
Post Options
Thanks(0)
|
|
I am also interested in a way to solve this issue. Any solution? (besides the one to use pictures emulating checkboxes instead of checkboxes)
|
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
If you set ReportControl.EditOnClick = False, does it still happen?
If you provide a small sample, I can experiment a bit to try and find a solution. One thing I notice is that there is no CancelEdit or FinishEditing method like some other grids I use - this would be nice. Even nicer would be a BeforeEdit(Cancel As Boolean) event that allows you to prevent editing based on any arbitrary conditions that you may have, but I don't see an event like this either. |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
Okay, there is a RequestEdit event, which fires before the edit window appears and allows you to cancel editing. Can you test for your column there and then set Cancel = True?
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
|
Hi,
I can't find a workaround and it seems we need a fix for this before new release.
This was working OK in previous versions.
Mark, please fix this for V14.0
|
||
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.... |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
IMHO, I think RequestEdit should only fire before the Edit box is going to be shown - that way you could still change the checkbox state, and prevent editing of the cell value by setting Cancel = True.
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
Here's a workaround if you are desperate for something until a proper fix is issued:
General section:
Code (adjust for the name of your reportcontrol as required)
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
choochy
Groupie Joined: 27 October 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
|
Thanks for the responses guys. Yes I have not seen this problem in previous releases either.
While this is not a good work around, I was able to get what I wanted by setting ReportGrid.AllowEdit = False. Lucky for me the only editable items in my lists are checkboxes.
I hope that this is fix soon.
|
||
Product: Xtreme SuitePro (ActiveX) version 13.4.2
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 & Delphi XE |
||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|
Cancel = True will cancel any changes made in request edit, so that wont work. I decided to add Item.CanEditCheckboxItem property to not break existing functionality. So incase someone actually wants to allow check box items to be edited they will be allowed to. Set Item.CanEditCheckboxItem = False and you are good to go :) **edit** I made False the default setting after checking an older version (12.1.1) and seeing that even with the item set to editable it would not display an edit control. |
||
choochy
Groupie Joined: 27 October 2006 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
|
Excellent. Thanks!
|
||
Product: Xtreme SuitePro (ActiveX) version 13.4.2
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 & Delphi XE |
||
Michael S.
Newbie Joined: 06 October 2009 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
|
Just another way to do it, as I just had the same problem. You can also set the column EditOptions like this:
rcCol.EditOptions.AllowEdit = False This will also allow checkbox editing, but no text editing. |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |