Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

default selection of radio buttons in a table

Hi

I have a table which has 3 columns of radio buttons. I want to set one as the default selected one. The radio buttons selected kye property is linked to the sub node of model node. its cardinality is 1:1.I tried doing it through the supply functions, but it throws an error for the cardinality.

I wrote the following piece of code in the wdModifyView(), but again the same error is displayed



if (firstTime)
    {
    
    int size = wdContext.nodeCmpNode_UserRights().size();
    IPrivateAssign_AuthenticationView.ICmpNode_UserRightsNode userright_node = wdContext.nodeCmpNode_UserRights();
    
	IPrivateAssign_AuthenticationView.INode_AuthorizationNode node = null;
	IPrivateAssign_AuthenticationView.INode_AuthorizationElement element = null;
	
    for(int i = 0;i<size;i++)
    {
    	node = userright_node.nodeNode_Authorization();
		element = node.createNode_AuthorizationElement();
	element.setAuthorization("Read");
	node.addElement(element);
	
    }
    }

I changed the cardinality to 0..n, but in this case only the first row comes as enabled with default radio button marked. For 1..n all the rows are enabled but no radio buttons are marked default.

Can someone please suggest in this regard.

Thanks & regards,

Anupreet

Former Member
Not what you were looking for? View more on this topic or Ask a question