Grid checkbox / up&down buttons

Started by TCNTRM, January 17, 2022, 12:03:57 PM

Previous topic - Next topic

TCNTRM

I have a question about grid.

First thing, I added the check boxes to each row, but how can I store a variable as string of the element in first column of the row that has been checked?

And second thing, I would like to make two buttons, UP and DOWN so the selected row would go up or down on the grid. Didn't find any help with that in samples, so maybe someone has an idea how to do that?

Thank you for your time.

Fred Tomke

Hello, I afraid, you already have a solution.

1) check box: not sure, whether I understood correct, but you have to check the event OnEndLabelEdit you get notified when the checkbox content has been changed storing it in a dictionary <rowNumber, checkState> to get access to the results after the for was closed.

2) Yes, I did it too, it need a couple ofwork:
- store cell values of the row in a list
- remove the row (dcl-Grid-DeleteRow )
- insert a new row in the desired line using the stored values (dcl-Grid-InsertRow )

Hope it helps
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

TCNTRM

Tanks! I figured out 1) in the meantime yes, but you helped me with 2) a lot, I made it work