Description:
When using a popup view with a feature layer that does not have any attributes (e.g. point has no default attributes), a System.ArgumentException can occur in the FieldPopupElementView.RefreshTable() method (see image below for exception details). This PR introduces a check to see if the FieldsPopupElement.Fields list is empty and, if the list is empty, results in the content being set to null and the method returning. This prevents the exception occuring.
Summary of issue:
In the FieldPopupElementView.RefreshTable() method:
A local variable i is initialised with a value of 0 (link to code).
i is increased in a loop that progresses up to the number of Labels or FormattedValues.
If there are no Fields, I believe there can be no Labels or FormattedValues, so the value of i stays as 0.
The subsequent call to Grid.SetRowSpan(verticalDivider, i); (link to code) causes the exception because i is 0.
Issue: none
Description: When using a popup view with a feature layer that does not have any attributes (e.g. point has no default attributes), a
System.ArgumentException
can occur in theFieldPopupElementView.RefreshTable()
method (see image below for exception details). This PR introduces a check to see if theFieldsPopupElement.Fields
list is empty and, if the list is empty, results in the content being set to null and the method returning. This prevents the exception occuring.Summary of issue: In the
FieldPopupElementView.RefreshTable()
method:i
is initialised with a value of0
(link to code).i
is increased in a loop that progresses up to the number ofLabels
orFormattedValues
.Fields
, I believe there can be noLabels
orFormattedValues
, so the value ofi
stays as0
.Grid.SetRowSpan(verticalDivider, i);
(link to code) causes the exception becausei
is 0.