Jump to content

dbgrid drag&drop destination grid row data


kfmedi

Recommended Posts

Hello,

I checked the demo and found the DropRowsEvent event. I get all info about the selected rows of the source grid and just the OverIndex of the destination grid. How can I get the dataset row of that destination grid row? I must know the data of the row on which the source rows were dropped.

I found this topic, but I cannot download the answer project: 

 

And another question. Is there a possibility to get the column on which the source rows were dropped?

 

unigui version: 1.90.0.1539 professional

Link to comment
Share on other sites

Thank you!

I could download and check it. It is not that I exactly thought. What happens if the grid is sorted not by the index column or the dataset is not a memory table.

Isn't there a simple way to locate the dataset according to a grid row index? Or get a column value in an arbitrary grid row (for example a table ID: grid.rows[roeIndex].columnByFieldname('TABLE_ID').value)?

Link to comment
Share on other sites

OK, I saw that not the grid sorts the rows. The dataset behind that does it, so the OverIndex is the dataset row index too.

But. Is there another type of drop? Now there is a green line between the destination grid's rows. In this case if I drop something on a row then it can give me 2 indexes: the right row index and the next row index depends on the green line's position. In my case I don't want to move/copy rows from one grid to another, I want to "assign" rows from the source grid to one row of the destination grid. I don't need the green line and I want one overindex independently of the drop position on one destination row.

Is there a solution to this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...