on 08-27-2007 2:14 PM
Re: InputFields in a table
Posted: Aug 27, 2007 1:13 PM in response to: Juergen Kind Reply E-mail this post
Hi,
I have read the documentation, but not got any clue for my problem,
In my component I have 3 Radio buttons in 3 Columns of a Table, and the functionality is like , when I click the 1st Radio Button , the 3rd Radio Button will be set readonly, and when again click on 2nd radio button the 3rd one will be enabled.
I have written action in On-click of radio buttons, but it's not working properly, if I set the readonly property false for 3rd one for a particular row, 3rd Radiobutton in all other rows also getting set to read only.
Please help me in this regard.
Thanks,
Sonia.
You need to use CELL_VARIANT fot his. Crete 2 cell variants for the column.
'Variant_Read_Only' for read only radio button
'Variant_Not_Read_Only' for the normal Readio Button
Both has the CELL_EDITOR as RadioButton. The 'Variant_Read_Only' Cell variant should have the RadioButton Cell Editor with read only property.
.
Bind the Cell_Variant property of the column to a context attribute . You have to fill this attribute with the NAME of the corresponding Cell variant...that is if you want Read only radio button, the name should be Variant_Read_Only and vice versa.
Thats It...
If u need more clarifications , do let know.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sonia.
You need an attribute in your context node which defines wetrher the cell editor of the column is enabled or disabled per row. Bind this property to the enabled attribute of the radio button column. When the first radio button is selected set this
attribute in the current element to false so that the third radio button will get disabled.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sonia,
You need to get the element of the current row which you have selected.This can be done in the onSelect of the radio button, in that method , there is a parameter WDEVENT , where the selected context element of the row will be available.
CALL METHOD WDEVENT->GET_CONTEXT_ELEMENT
EXPORTING
NAME = 'CONTEXT_ELEMENT'
RECEIVING
VALUE = <YOURTABLETYPE>
.
This will fetch you the current row which you have selected , and from this you can update the radio button values and bind it back
Thanks
Anzy
Hi Anzy,
Your answer solved my problem partially, thanks a lot,
Please tell me one thing like, if I want to set the radio button as read only, by binding it's read only property with a WD_BOOLEAN Type Context Attribute, do I need to create that attribute with in this Table Context Node??
Actualy, initially I created one separate node, which have this WD_BOOLEAN Type Context Attribute and the read only property of radio button is bound to this attribute,
But when I am setting this as TRUE, it's making the whole column read only, not just for the selected row.
Thanks for your quick response.
Sonia.
Hi Sonia.
What you did is wrong, cause the extra node contains only one element i Guess and this element is used ans set by all cell editors of all rows of the other node.
So if you set this attribute to false, all cell editors are bound to it and will be disabled. You have to create the attribute in the node of the table so that each row has its on value and each cell editor will be bound to this attribute of its own element.
Cheers,
Sascha
Hi Sonia,
You should not create an extra node. Add an additional attribute of type wdy_boolean in your existing context node that is bound to the table. Bind the enabled property of the 3rd column cell editor to this attribute.
In the action handler of the 1st radio button, set this attribute to false and in the 2nd event handler set it to true. In both cases, use the statement given by Any to get the current row in which the radio button was clicked and just do lr_element->set_attribute( ). That will solve the issue.
Regards
Nithya
Hi
It seems like , you are setting the property for the entire node , rather than setting the value for the perticular element.
Please paste your code..so that we can point out wheere the acvtual problem is ..
Thanks
Anzy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anzy,
I have created one context attributr, read_only which is WD_BOOLEAN,
Read Only Property of the Radio Button in the 3rd Column is bound to this context attribute,
And onclick of Radio Button in First Column, I am setting the read_only context as true,
I think it is getting set to true for the whole node, please tell me how to set it true, for that particular selected row element,
One more thing , I have written some more functionality on this OnClick action, but it is working fine with the selected row only,
If I select a RDB for a ROW which is not selected, this code is not working properly,
Thanks for your quick response.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.