cancel
Showing results for 
Search instead for 
Did you mean: 

How to call WdDoModify method from wdDoInit()

Former Member
0 Kudos

Hi experts

can it be possble to call explicitly WdDoModify

method from wdDoInit(); If yes then kindly tell me how to call it

I have called like this

wdDoModifyView(wdThis,wdContext,IWDView IPrivateStartView,true);

I dont know what to write instead of IWDView as its being displayed IWDView can not be resolved .

Regards

Abhay

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

No of elements to be added are not known at design time . thats why i want to call wddomodify explicitly in eventhandker of button , but i am not sure how call it . please forward me calling code

Regards

Abhay

Former Member
0 Kudos

Hi,

1. Create a boolean flag in your class.

public boolean canModifyView;

2. Inside your event handler set this flag to true.

wdThis.canModifyView = true;

3. Inside wdDoModifyView() write the following:

if(wdThis.canModifyView){
//you can now add your code to modify the view
}

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

wdDoModifyView() would be called each time an action is performed and you need not call it explicitly.

If you want to perform some action based on the click of the button then create a context of type boolean and set it to true on the action attached to the button.

Now in wdDoModifyView() just check the value of the context to be true and perform your operation.

Regards,

Murtuza

Former Member
0 Kudos

Yes, that's the way to do it. And don't forget to reset the flag in wdDoModifyView().

Armin

Former Member
0 Kudos

hi Ayyapparaj

My requirement is like, I want to craete button ,textview and actions to attach them to UI , after clicking an existing button , so in the eventhandler i want to explicitly call it .

Regards

Abhay

Former Member
0 Kudos

In the button event you call the Wddomodify() method and create dynamic UI elements.

Former Member
0 Kudos

HI,

If this is needed for a pre set of values, you can create it at either at design time or at runtime set the visibility to false and based on the criteria make them visible.

Regards

Ayyapparaj

Former Member
0 Kudos

No.

Armin

Former Member
0 Kudos

Hi,

You wont be able to call it.

If the requirement is to assign some values to any UIElement make use of context binding.....

Regards

Ayyapparaj

Former Member
0 Kudos

You can directly call it Wddomodify(Wdevent); as you call the normal functions.

As this is a life cycle method im not sure that we can call from Wdinit() method;But we can call after the init method in any function.