Giter VIP home page Giter VIP logo

Comments (2)

jingwood avatar jingwood commented on May 26, 2024

This is not a feature that can be implemented easily.

Moving the data of a column can be straightforward, but if you have merged cells or borders, there should be processes for how to split or combine merged cells, and how to handle the borders. Additionally, if you have formulas, you need to consider how the formula references change.

We may consider implementing this feature in future versions, but it may take some time.

from reogrid.

CanadianHusky avatar CanadianHusky commented on May 26, 2024

@hs205118
I agree with @jingwood. It can get very complicated depending on the existing structure of the Grid.

Here is my suggestion how I would implement Column Reorder without any changes to the control itself.
1- Hook an event handler to the Reogrid.Mouseup and watch for right click
2- On Mouse Right Click event, open your own Form/Control that has a basic Listview or Listbox with the current column names. Enable Drag & Drop for reorder on your own control. Example : https://stackoverflow.com/questions/805165/reorder-a-winforms-listbox-using-drag-and-drop. Keep track of internal Column display indexes when closing your Form.
3- Rebuild your Reogrid contents from the underlying data with own code, under consideration of DisplayIndexes of the columns. The Column headers in Reogrid allow renaming, so to the user it will look like the column position changed. You need a list or dictionary object that keeps track of and maps Datacolumn vs DisplayIndex.

from reogrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.