![]() |
[SOLVED] Edit Cancelled on Populate |
Post Reply ![]() |
Author | |
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
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.... |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
![]() |
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 |