List Info

Thread: selectOneRadio/selectBooleanCheckbox problem?




selectOneRadio/selectBooleanCheckbox problem?
country flaguser name
Norway
2007-10-05 06:22:42
I have a table that has x rows... Each row has n columns and
some of these columns should be a checkbox the user
can enable/disable..
The problem is that only one of the checkboxes for a column
can be enabled, i.e. when the user enable one
checkbox in one row, if another checkbox in the same column
in another row is enabled it should be disabled (like a
radiobutton feature)

Is there a smart way of doing this or do I have to use an
onclick event and do it manually?


Regards,

BTJ
-- 
------------------------------------------------------------
-----------------------------------
Bjørn T Johansen

btjhavleik.no
------------------------------------------------------------
-----------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards
you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it
installs Windows"
------------------------------------------------------------
-----------------------------------

Re: selectOneRadio/selectBooleanCheckbox problem?
user name
2007-10-05 06:40:25
Bjørn T Johansen a écrit :
> I have a table that has x rows... Each row has n
columns and some of these columns should be a checkbox the
user
> can enable/disable..
> The problem is that only one of the checkboxes for a
column can be enabled, i.e. when the user enable one
> checkbox in one row, if another checkbox in the same
column in another row is enabled it should be disabled (like
a
> radiobutton feature)
>
> Is there a smart way of doing this or do I have to use
an onclick event and do it manually?
>
>
> Regards,
>
> BTJ
>   
Easy way:

onclick, javascript. However, a user with javascript
disabled will 
override this and allow multiple row selected, be carefull

smart way: create a custom component that has this behaviour
and check 
only one row is selected
really smart way: considering the notion of "selecting
a row of 
datatable" has been raised countless time on this
mailing list, i doubt 
there isn't an open source library with alreay such a
component 


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )