OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: TCNTRM on January 17, 2022, 12:03:57 PM

Title: Grid checkbox / up&down buttons
Post by: TCNTRM on January 17, 2022, 12:03:57 PM
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.
Title: Re: Grid checkbox / up&down buttons
Post by: Fred Tomke on February 25, 2022, 04:20:47 AM
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
Title: Re: Grid checkbox / up&down buttons
Post by: TCNTRM on May 04, 2022, 06:23:40 AM
Tanks! I figured out 1) in the meantime yes, but you helped me with 2) a lot, I made it work