Skip to Content
avatar image
Former Member

Setting default value in radiobutton group

hai,

i am using radibuttongroupbykey with four values.

my requirement is set a radio button of the four as default when the screen comes for the first time. how to do this?

urgent.....

Madhu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Aug 17, 2007 at 06:46 AM

    Hi

    in WDDOINIT method set the context attribute value to one of the possible values, the context attribute which you used in selectedKey property of the RadioButtonGroupByKey element.

    wd_context->set_attribute( name = <context attribute> value = '<value>' ).

    Regards

    Abhimanyu L

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2007 at 06:47 AM

    Since you would be using a value set to populate the four values, just do a set_attribute tby passing one of the values. That would be selected by default.

    Regards,

    Nithya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2007 at 02:26 PM

    Hi,

    Pls set the lead selection of the node to which your radioButtonGroup is bound, to the default value u want.

    if the radiobuttonGroup is radiobuttonGroupByKey, and the selectedKey is bound to attribute 'attr1' of NodeA and the default Key u want to set as selected in the group is key1

    NodeA->SET_ATTRIBUTE(

    NAME = 'attr1'

    VALUE = ' key1' ).

    if the radiobuttonGroup is radiobuttonGroupByIndx, set the Lead Selection Index of NodeA to the correct index

    So if key1 is at index 5 in the Node,

    NodeA->SET_LEAD_SELECTION_INDEX( 5 ).

    Thanks

    Add comment
    10|10000 characters needed characters exceeded