Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [SOLVED] Edit Cancelled on Populate
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Edit Cancelled on Populate

 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: [SOLVED] Edit Cancelled on Populate
    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

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

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

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

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

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.