Using a DevExpress XtraGrid and Trying to Move Records Up or Down


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I did set the SortOrder so I had that piece but I am confused. After I create the new BO based on the record that has Focus what am I to do with it?
I see it does have the JudgesSheetPositionNumber value in boInGridView.JudgesSheetPositionNumber and certainly when I add 1 to that it will tell me the position it is going but I don't know what to do from there? 

Also, the following line of code would not let me put BO1 on the end.

boInGridView = TryCast(Me.GridView1.GetRow(index), ResultsPerfsChecksTimedEventBO)

Yes Edhy, I agree I was planning on validating the move when in first position and last position.

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Terry Bottorff (9/7/2014)

Also, the following line of code would not let me put BO1 on the end.

boInGridView = TryCast(Me.GridView1.GetRow(index), ResultsPerfsChecksTimedEventBO)

That is correct because when you Cast() or TryCast() you have to pass the class type as a parameter not an instance of a class which in this case would be the BO1, so my code is correct.
I know it can be confusing but if you look closely it is actually very simple. 

I have to go out now and will be back in 2 hours, if you want email me your phone and I will call you to make a remote session and see your project, this could get done in 10-20 minutes and would be easier to explain.

Edhy Rijo

Buffie
Buffie
StrataFrame User (451 reputation)StrataFrame User (451 reputation)StrataFrame User (451 reputation)StrataFrame User (451 reputation)StrataFrame User (451 reputation)StrataFrame User (451 reputation)StrataFrame User (451 reputation)StrataFrame User (451 reputation)StrataFrame User (451 reputation)
Group: StrataFrame Users
Posts: 119, Visits: 11K
With Edhy's help and expertise I (we) were able to get the move to work in the DevExpress Grid.  Edhy is such a valuable resource....

If someone is interested in the code I will gladly post it.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search