06-14-2009 03:03 AM
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# .
06-16-2009 01:32 AM
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.
06-16-2009 01:43 AM
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 ?
06-16-2009 01:45 AM
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.
06-16-2009 01:52 AM
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?
06-16-2009 01:58 AM
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.
06-16-2009 02:12 AM
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);