Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Move a Row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Move a Row

 Post Reply Post Reply
Author
Message
braian87b View Drop Down
Groupie
Groupie


Joined: 01 April 2008
Location: Argentina
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote braian87b Quote  Post ReplyReply Direct Link To This Post Topic: Move a Row
    Posted: 03 April 2008 at 7:04pm
Please, i need to know how to move programatically a row/record to another index, for the classic buttons "Move Up" "Move Down" than moves the current focused row/record swapping places with the previus or next near.
 
Thanks for advance.!
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 April 2008 at 4:49am
Hi,
 
I think you have to do this yourself. Using InsertAt and RemoveAt methods allow you to "move" the records.
 
Down:
 
wndReportControl.Records.RemoveAt wndReportControl.FocusedRow.Index
    wndReportControl.Records.InsertAt wndReportControl.FocusedRow.Index + 1, wndReportControl.FocusedRow.Record
 
wndReportControl.Populate

Up:
 
wndReportControl.Records.RemoveAt wndReportControl.FocusedRow.Index
    wndReportControl.Records.InsertAt wndReportControl.FocusedRow.Index - 1, wndReportControl.FocusedRow.Record
wndReportControl.Populate
 
Note: this doesn't work with sorting
 
 
Back to Top
braian87b View Drop Down
Groupie
Groupie


Joined: 01 April 2008
Location: Argentina
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote braian87b Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2008 at 12:26pm
thank you, but seems i dont have that method in my control
 I have 10.1 version
 
where i can download another more newer version lite, or demo, whenever.
 
 
Thanks in advance
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2008 at 1:06pm
http://www.codejock.com/downloads/
Back to Top
braian87b View Drop Down
Groupie
Groupie


Joined: 01 April 2008
Location: Argentina
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote braian87b Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2008 at 1:17pm
Thanks!, im downloading the files rigth now.
 
 
 
Back to Top
braian87b View Drop Down
Groupie
Groupie


Joined: 01 April 2008
Location: Argentina
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote braian87b Quote  Post ReplyReply Direct Link To This Post Posted: 25 April 2008 at 1:46pm
Originally posted by Aaron Aaron wrote:

Hi,
 
I think you have to do this yourself. Using InsertAt and RemoveAt methods allow you to "move" the records.
 
Down:
 
wndReportControl.Records.RemoveAt wndReportControl.FocusedRow.Index
    wndReportControl.Records.InsertAt wndReportControl.FocusedRow.Index + 1, wndReportControl.FocusedRow.Record
 
wndReportControl.Populate

Up:
 
wndReportControl.Records.RemoveAt wndReportControl.FocusedRow.Index
    wndReportControl.Records.InsertAt wndReportControl.FocusedRow.Index - 1, wndReportControl.FocusedRow.Record
wndReportControl.Populate
 
Note: this doesn't work with sorting
 
 
Question: Can this be done in some way with the v10.1 version of the ReportControl ?
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: 26 April 2008 at 9:22am
Hi,
 
I don't know the properties/methods of V10.1 so I don't know if its possible or not. What I posted before is just a workaround and possible with V11.2 (thats also the only version I know)
 
Maybe there is someone who did the same and with your version.
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.328 seconds.