Home Forums WinForms controls Xceed Grid for WinForms Can XceedGrid Insert a row where the mouse is located on the grid

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16568 |

    Hi,

    I would like to insert a row into an unbound grid that has some rows

    already. The position of inserting should be where the mouse is (i.e. above 

    or below the closest row.) Can Xceed Grid do that? I have not seen any InsertRow method.

     

    In my case I want to let the user do a drag & drop where nothing is really dropped but

    where the ‘drop’ at mouse-up simply does insert a new row to the closest existing row (closest

    to the mouse position).

    Any ideas if this can be done in Xceed?

     

    Thanks,

    Norman

     

     

     

     

    Imported from legacy forums. Posted by fano (had 639 views)

    User (Old forums)
    Member
    Post count: 23064

    We have a few samples that might help you accomplish this, but basically, you need to add an hidden index column on which you can sort the rows, so when you add a new row, you can place it at the index you want.  This is necessary because the grid always adds new rows at the end of the DataRows collection, thus at the bottom of the grid.

    http://www.xceedsoft.com/cs/download/XceedGrid/CSharp/Drag and drop samples.zip

     

    Imported from legacy forums. Posted by André (had 976 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.