Print Page | Close Window

Make ReportRecordItem editable

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=3710
Printed Date: 26 April 2024 at 2:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Make ReportRecordItem editable
Posted By: Shawshank
Subject: Make ReportRecordItem editable
Date Posted: 27 February 2006 at 6:22pm

I want to have two ReportRecordItems be editable, i.e. single click upon the item and the text within can be edited. I use the following code in that attempt:

Dim Record As ReportRecord

Dim Item As ReportRecordItem

Dim Column As ReportColumn
    
Set Column = Me.rc.Columns.Add(0, "Alias", 1, True)
    
Set Column = Me.rc.Columns.Add(1, "Name", 1, True) Column.EditOptions.AllowEdit = True
    
Set Column = Me.rc.Columns.Add(2, "Surname", 1, True)

Set Record = Me.rc.Records.Add()
    
Set Item = Record.AddItem("Fred Garvin")
Item.HasCheckbox = True
    
Set Item = Record.AddItem("Fred")

    Item.CreateEditOptions
    Item.EditOptions.AllowEdit = True
    Item.EditOptions.SelectTextOnEdit = True

Set Item = Record.AddItem("Garvin")
Item.HasCheckbox = True

Me.rc.Populate


This does not allow ReportRecordItems of Column.Index 1 be edited. Is it possible to edit a single ReportRecordItem? If so, what about my code is improper?




Replies:
Posted By: sserge
Date Posted: 01 March 2006 at 3:36am
Hi,

Try it from another side: allow editing for the control itself and disable editing for all other columns, like:

Set Column = Me.rc.Columns.Add(0, "Alias", 1, True)
Column.EditOptions.AllowEdit = False

Set Column = Me.rc.Columns.Add(1, "Name", 1, True)     

Set Column = Me.rc.Columns.Add(2, "Surname", 1, True)
Column.EditOptions.AllowEdit = False

...

Me.rc.AllowEdit = True
Me.rc.Populate


--
WBR,
Serge



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