How to display a checkbox in the grid?

Chintan@JDE

Member
Hi List,

I have a requirement to add a flag in the grid in the form of a checkbox. I have tried a few things to make it work but havent achieved any success yet.

If anyone of you implemented checkbox on the grid then please do guide me for the same.

Thanks in advance,
 
Hi Chintan,

I had simulated check-box as well as green check-mark vs red X mark.
Briefly the technique:
- make the cell click-able
- set the column font to Windings in the (Post) Dialog Is initialized
- add a grid scope variable (grd_) to the grid to store ON/OFF state
- play/toggle in the Grid Column Clicked event:
> the grd_ variable
> the character in the cell
> the font color

Hope, it helps - it was my secret trick
cool.gif
up to know
wink.gif


Regards,

Zoltán
 
Dear All,

I just happened to have similar Requirement and found these refinements and ideas;
  1. In grid column properties under "General" tab "Display style" select check box. This works only on thin client though. On FAT client it doesn't look like a check box. It showed me as a normal field.
  2. The other option is as suggested by Zoltán above, we had to set the value of GC Grid column to a certain Alphabet whose corresponding Font type "Wingdings2" displays colourful Tick marks and cross Marks as need be. I was able to see it nicely with colors as set when i ran it on FAT Client but when i run the same in local thin client i dint see those check marks not sure why. probably after deployment it might work on server. Will need to check.
 
Hello all,

I have some similar requirement and i tried the first option that is In grid column properties under "General" tab "Display style" select check box.
But i also want to have a check box in QBE. Is that possible??
 

Attachments

  • Check box.PNG
    Check box.PNG
    2.2 KB · Views: 2
Hello all,

I have some similar requirement and i tried the first option that is In grid column properties under "General" tab "Display style" select check box.
But i also want to have a check box in QBE. Is that possible??
No. Whatever value you using to determine if cells are checked or not can be used as a filter though. Typically 1 or 0, Y or N, etc
 
Its very annoying that when you specify a grid column is a checkbox that the QBE part doesn't also inherent this UI property. But I guess I can kind of understand, since a checkbox (in JDE) by nature has a binary state TRUE/FALSE, while the QBE cell needs three states TRUE/FALSE/[No filter].

BTW, I always use checkboxes for true/false fields and always use 0/1. I guess the next best thing you can do is make sure the search and select for the column returns the correct two values that are valid for the field, either 0/1, Y/N, etc. so if the user does want to filter they know which values to use.
 
Back
Top