Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl: How to respond to moving a row?
Re: GridCtrl: How to respond to moving a row? [message #21813 is a reply to message #21806] Sat, 06 June 2009 02:44 Go to previous messageGo to previous message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
I made a very tiny patch and added in WhenMoveRow. It would be nice to have something a bit more powerfull such as WhenSwapRow and have it pass the row indexes that were swapped. Also something along the lines of CancelMove, i.e. like CancelInsert, CancelUpdate.

Anyway, with this I am progressing with my app and can rework it later if I totally missed how to accomplish this w/o changing GridCtrl.

Index: GridCtrl/GridCtrl.cpp
===================================================================
--- GridCtrl/GridCtrl.cpp       (revision 1276)
+++ GridCtrl/GridCtrl.cpp       (working copy)
@@ -5178,6 +5178,7 @@

        row_order = true;
        SetModify();
+       WhenMoveRow();

        return true;
 }
@@ -5231,6 +5232,9 @@
        }
        row_order = true;
        SetModify();
+
+       WhenMoveRow();
+
        return true;
 }

Index: GridCtrl/GridCtrl.h
===================================================================
--- GridCtrl/GridCtrl.h (revision 1276)
+++ GridCtrl/GridCtrl.h (working copy)
@@ -1692,6 +1692,7 @@
                Callback WhenRemoveRow;
                Callback WhenRemovedRow;
                Callback WhenDuplicateRow;
+               Callback WhenMoveRow;

                Callback WhenCancelNewRow;


Jeremy
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GridCtrl Search/Move Columns Bug
Next Topic: Grid Search Color on XP = very hard to read
Goto Forum:
  


Current Time: Tue May 14 22:05:10 CEST 2024

Total time taken to generate the page: 0.01761 seconds