Community
Showing results for 
Search instead for 
Do you mean 
Reply

display new custom sub entity to contact layout tab

Avid Listener
Posts: 83
Country: Malaysia

display new custom sub entity to contact layout tab

Hi all,

 

i managed created new sub entity but how i can showit with my new tab to contact layout ?

i dont have ideas how to show it . 

 

i developed using c# .

 

Thanks,

Jeff.

Nickel Super Contributor
Posts: 441
Country: UK

Re: display new custom sub entity to contact layout tab

http://community.act.com/sage/board/message?board.id=ADN_Downloads&thread.id=1&view=by_date_descendi... - this thread has a sample from Xavier which creates a custom entity and displays it.  Its well commented and should answer most of your questions.

 

Tom

Avid Listener
Posts: 83
Country: Malaysia

Re: display new custom sub entity to contact layout tab

HI Tdavis,

 

I had downloaded the sample but what the difference from sample project is my user just have read-only access.

In the policy sample, have add, edit and delete functions.

so i need to create a freign key to link to ACT TBL_Contact and display in datagridview.

when user select next , it will referesh the datagridview.

but i dont know how to code ?

 

Thanks,

Jeff.

Nickel Super Contributor
Posts: 441
Country: UK

Re: display new custom sub entity to contact layout tab

Craete and add the tab in exactly the same way as the sample, just don't add the buttons and the context menu for adding and deleting records, without that the grid is just a data viewer.

 

Tom

Avid Listener
Posts: 83
Country: Malaysia

Re: display new custom sub entity to contact layout tab

Hi Tdavis,

 

Thanks. But how do i get TBL_contact skip records so i can trigger my refresh datagridview ?

 

Thanks,

Jeff.

Nickel Super Contributor
Posts: 441
Country: UK

Re: display new custom sub entity to contact layout tab

Sorry I don't know what you mean by 'Thanks. But how do i get TBL_contact skip records so i can trigger my refresh datagridview' - do you mean how do you update the grid as you move through the database?

 

Tom

Avid Listener
Posts: 83
Country: Malaysia

Re: display new custom sub entity to contact layout tab

Hi Tdavis, yes ys exactly.

 

This is what i mean.

 

Thanks,

Jeff.

Nickel Super Contributor
Posts: 441
Country: UK

Re: display new custom sub entity to contact layout tab

Hi Jeff,

Have a look at the sample, behind the custom tab control you need to attach to the ContactChanged event, when this fires you can retireve the data for the new contact.

 

Tom

Avid Listener
Posts: 83
Country: Malaysia

Re: display new custom sub entity to contact layout tab

Hi Tdavis,

 

Thanks for CurrentContactChanged then i can load everthing to my datagridview.

Thanks so much.

 

  public PolicyTabControl(ActApplication actApplication, CustomEntityDescriptor descriptor)

{

InitializeComponent();

this.actApplication = actApplication;

// Pass in and retain the CustomEntityDescriptor for Policy.

 this.descriptor = descriptor;

// Sign up for current contact changed for the grid to be able to load it's data.

 this.actApplication.CurrentContactChanged += new EventHandler(actApplication_CurrentContactChanged);

// Sign up for visible changed so the control doesn't paint unless it's visible.

 this.VisibleChanged += new EventHandler(PolicyTabControl_VisibleChanged);

// Sign up for the before logoff event so the control can unregister from the events.

 this.actApplication.BeforeLogoff += new EventHandler(actApplication_BeforeLogoff);

}

Nickel Super Contributor
Posts: 441
Country: UK

Re: display new custom sub entity to contact layout tab

No worries, glad its working Smiley Happy

 

Tom