Categories | Question details Back To List | ||
Deselection of radio button in grid Hi, We have a radio button in one of the columns of a grid. Once a person selects the radio, on the subsequent selection of same cell, i want the radio to be deselected. Also, i want to get the handler of the event (deselect event) so that i can call my code for some other operation. The problem i am facing is that the radio button is not getting deselected. Also, click event on the selected radio button is also not getting called. Is there any way by which we can get the handler of deselect event for a radio button? To overcome this problem, i tried to use checkbox. but could not deselect the already selected checkboxes so that only one checkbox is selected if user selects any other checkbox. Thanks, Vibhav Agrawal PS. I am using dhtmlx Grid Pro v2.5 Answer posted by dhxSupport on Dec 28, 2009 02:10 >>Once a person selects the radio, on the subsequent selection of same cell, i want the radio to be deselected You can do that with "ch" column type >>Also, i want to get the handler of the event (deselect event) so that i can call my code for some other operation. You can use "onCheck" event. http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:event_oncheck Answer posted by Vibhav Agrawal on Dec 28, 2009 02:46 Hi, Thanks for your reply. But i am sorry to say that i did't get a full reply for my query. I have already mentioned the problem (that i am not able to deselect the already selected checkboxes) which i am facing with the solution you have provided (to use checkbox instead of radio button). Could you please provide me some dummy code by which i can deselect the already selected checkboxes so that i can have only one item as selected item.
Thanks, Vibhav Agrawal
Answer posted by dhxSupport on Dec 28, 2009 02:48 You can deselect already selected checkbox with following code: mygrid.cellById(row_id,cell_index).setValue(0); |