Active WorkItem

Topics: CAB & Smart Client Software Factory
Jul 5, 2007 at 8:40 AM
Hi everybody.

I'm having troubles with getting the correct active WorkItem.

I have an outlook like application, with an OutlookBar at the left side, for implement it i've used DevExpress XtraNavBarWorkItem, and now i'm loading three WorkItems in int. Also I have one button in the tool strip witch depending on the workitem selected on the side bar it should do some action.

The problem is that when I changed the workitem pushing in the NavGroupHeader, active workitem doesn't changes untill i click on the view. So when I push that toolbar button , it doesn't do the required action, it do the last selected workitem related action, not current workitem one.

Has someone have the same problem??

Regards!
Sergio
Jul 5, 2007 at 3:07 PM
Hi Sergio,

Maybe you could activate the WorkItem you want manually, by doing something like:

((WorkItem)RootWorkItem.Workitems.Get("WorkItemID").)Activate()

In case you feel that could work, maybe this thread (http://www.codeplex.com/smartclient/Thread/View.aspx?ThreadId=4348) will be helpful.

Hope it helps!

Luciano G. Panaro
http://staff.southworks.net/lpanaro
Jul 6, 2007 at 7:15 AM
But I'm getting a bit crazy about that.

Now I have a Business Module, and a Foundational Module. Foundational module only has some views, and a service to search customers, and I've integrated it with the Business Module.

I'm going to try explain me.

When I load the BusinessModule, I show it views in the RightWorkspace and also, I show one of the Foundational views at the LeftWorkspace. Why BusinessModule WorkItemController is not activated when I show that View?? Have I had to convert that Search Customers Foundational Module in a Business one in order to have a Child WorkItem to show, and this way activate parent one when it's shown?

Thanks a lot for your attention.
Sergio.
Jul 6, 2007 at 11:02 AM
Well, I'm fighting against this trouble all morning and I'm discovering some things, wich i will write here due to solve that problem.

In the XtaNavBarWorkspace I show two types of view.

First one, works correctly. That view has another XtraNavBarWorkspace, so there are two of these workspace nested. That's works well, when I change group, correct workItem is activated.

Second one is getting me crazy. This view has a DeckWorkspace, and a view in int. Well, when this View is showed, nothing happends. I have to click in the view for Workitem.Activating event being launched.

It could be cause by these two types of controls? I'm debugging step by step and divint into Composite UI. And I found that when I select the First Workitem (wich works) ControlActivationService.OnControlEntered event is raised. But it doesn't happends in the second WorkItem.

Could someone help me?
Thanks for your attention.