Print Page | Close Window

[SOLVED] Edit Cancelled on Populate

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=14585
Printed Date: 09 June 2024 at 8:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Edit Cancelled on Populate
Posted By: jpbro
Subject: [SOLVED] Edit Cancelled on Populate
Date Posted: 20 June 2009 at 4:32pm
I have a report control  with 2 columns, only 1 of which is editable. I have a separate thread that raises an event that modifies the caption of the UNeditable column. If this event get raised (and changes the caption of the uneditable item) while the user is editing an item in the editable column, the edit window gets closed. Is there any way to prevent this?


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

Language: Visual Basic 6.0 SP6




Replies:
Posted By: jpbro
Date Posted: 20 June 2009 at 11:24pm
After more testing, I've discovered that the edit box disappears after calling ReportControl1.Populate. Is there any way to prevent this? Perhaps if there is a way to refresh a specific ReportRecordItem instead of calling Populate to refresh the whole RC?

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

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 20 June 2009 at 11:36pm
Looks like the UpdateRecord method does what I want (ReportRecordItems can be changed programmatically without causing the edit window to close).


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

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 21 June 2009 at 2:20am
Hi Jason,
 
If you only need to update value on screen just call ReportControl.Redraw method.
 
You need UpdateRecord or Populate call only if changed value change Row position (in sort order or in groups).
 
 
 


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


Posted By: jpbro
Date Posted: 21 June 2009 at 12:11pm
Hi Aaron,

I tried the Redraw method, but it also closes the edit window if the user is typing into a ReportRecordItem. It seems that UpdateRecord doesn't close the window though (which works for my purposes).


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

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 21 June 2009 at 12:26pm
Actually, I just found the UpdateField method of the DataManager object, which is likely even a better choice, since it only updates a single ReportRecordItem instead of the entire ReportRecord.


With Me.ReportControl1
     .DataManager.UpdateField lo_Rec.Item(l_UpdatedItemIndex) ' Where lo_Rec is a ReportRecord object
End With





-------------
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