Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grid: output row, disable rightclick, set checkbox state
#4
Sorry I have another question regarding the chekbox state in a grid.

In the first cell of my grid I also render a checkbox but in that same cell there is data the user can click on.
If the user clicks in the first Cell on a data item it execute something (with data item I mean cell-text).
If the user clicks in the first Cell on a checkbox it must only set the state of the checkbox.

The problem in my code is that when the user clicks on a checkbox it also executes the function which is attached to Cell one.
The below sample code should render a messagebox when the user clicks on the first cell-TEXT (NOT the checkbox).

Function grid_checkbox_dlg
Code:
Copy      Help
,,,case NM_CLICK
,,,,if(na.iSubItem=0)
(`i),,,,,
mes("Cell clicked!, NOT checkbox!") ;; Should only appear when cell-TEXT is clicked, NOT when checkbox is clicked.

To be more clear what I mean with the first cell, QM seems to render the first cell like this
Code:
Copy      Help
{ cell 0} { cell 1 } {.....etc...

Cell 0 has the checkbox AND celltext:
{ [X] [CELL TEXT] }


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)