Open ItemDialog Usage Question

159
2
Jump to solution
09-30-2020 08:34 PM
ThanHtetAung_EsriAu
Esri Regular Contributor

Hi Guys,

I would like to check two properties of OpenItemDialog object and their usages, would like to understand father on when and how we should use?

It has InitialLocation for folder path, and alwaysuseinitiallocation as Boolean.

Since our intention is to initiate the folder location when the openitemdialog is open, we set the value in InitialLocation but some how we always need to define alwaysuseinitiallocation to true because if we don't do that openitemdialog might not start with that folder location. (or never).

Is there any circumstance or any useful use case with initiallocation is set and alwaysuseinitiallocation is false condition?

Or is that possible to enhance sdk feature when initiallocation folder path is set and valid, alwaysuseinitiallocation to be true as always?

0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

The description for AlwaysUseInitialLocation says this:

"Always use the InitialLocation if specified. If not specified, the initial location may be the last location opened using the current filter."

The main point in this description is this: “the initial location may be the last location opened using the current filter”

So if you are using a filter in the open item dialog, the initial location that is displayed will be the location used by that filter previously (could be from a dialog different to yours).

You can prevent this behavior by setting the AlwaysUseInitialLocation property to true.

View solution in original post

0 Kudos
2 Replies
UmaHarano
Esri Regular Contributor

The description for AlwaysUseInitialLocation says this:

"Always use the InitialLocation if specified. If not specified, the initial location may be the last location opened using the current filter."

The main point in this description is this: “the initial location may be the last location opened using the current filter”

So if you are using a filter in the open item dialog, the initial location that is displayed will be the location used by that filter previously (could be from a dialog different to yours).

You can prevent this behavior by setting the AlwaysUseInitialLocation property to true.

0 Kudos
ThanHtetAung_EsriAu
Esri Regular Contributor

Thank Uma Harano‌ for clarification,

As you may see, I understood wrongly, because if I set initial location, that will initialize by default.

So that Boolean property AlwaysUseInitialLocation is the main item and must set value together in both value.

0 Kudos