Detailview vs DockPanel

StatusIDPriorityType
Closed32907MajorQuestion
ProfileReply
keskinozClient

Hi,
Is this scenario possible using the dock panels:
The current object is on the detailview and the dock panel (Details relation type) has a listview.
The detailview has "Firm" combobox. When the user changed this combobox, then the listview (has "RelatedFirm") in the dockpanel should be filtered displaying only that firms user selected.
Keskinoz.

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello keskinoz!

We think that this scenario is possible.

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

keskinozClient

Hi,
Could you explain the details how can i do this scenario?
Thanks,

MariyaVoytovichAgent

Hello keskinoz!

We apologize for the delay.

This details for your scenario:
1. Open Model Editor
2. Navigate to the target node (target Detail View or target Business class)
3. Add new ViewDockPanelV2Details to the DockPanels node.
4. Set the DetailObjectType to the type that will be displayed in the dock pane.
5. In RelationCriteria, specify the expression "Firm =?"
6. In Parameters new dock panel add new parametr
7. in Expression write "[This].Firm"

More information in documentation Dock Panels. Data Relation
Feel free to reactivate this issue if you need any further clarification on the subject.

Regards,
Mariya
On behalf of Xafari Client Services Team

keskinozClient

Hello Mariya,
If I change the firm selection from the firm combobox in the detailview, I expect
the listview in the dockpanel to be refreshed by showing the records related to that selected firm.
But the listview is not refreshed unless i save the detailview.
If I save the detailview after selecting the firm from the firm combobox then the listview in the dock panel works as expected.

Expecting the user to save the detailview everytime after changing the firm combobox would not be a good solution.
Is there any solution to overcome this issue?

Regards,
Keskinoz.

MariyaVoytovichAgent

Hello keskinoz!

I apologize for the delayed response.

You can use another scenario for your task:
1. Add an Independent DockPanel as described above.
2. Add new view controller.
3. In controller you should get target dock panel.
You can get it from XafariDockingWindowController.
In controller has properties: ActiveModelDockPanels, ActiveModelClassDockPanels, ActiveModelViewDockPanels that contain active dockpanels

for example:

var controller = this.Frame.GetController();
if (controller == null) return;
var dockPanel = controller.ActiveModelClassDockPanels.First(x => ((ModelNode)x).Id == "Product_DockPanel_Independent");

In this code I get dock panel that was add in BOModel.

4. subscribe to the combobox event that occurs after the value change.
5. in event handler you should add new criteria to dockPanel

dockPanel.Criteria = CriteriaOperator.Parse("[Firm.NameFirm] = ?", currentObject.Firm.NameFirm).ToString();

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

keskinozClient

Hello Mariya,
Thank you.

Keskinoz.

× This ticket is closed.

Write US