<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Customization in the attribute grid of Inspector in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291326#M9839</link>
    <description>&lt;P&gt;If you are using ArcGIS Pro 3.1 or higher there is also the InspectorProvider class that allows customization of field visibility, editability, display name, etc in the inspector when it is displayed as an embeddable control.&amp;nbsp; &amp;nbsp;These customizations are different from using the IDisplayTable to make the changes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://prodev.arcgis.com/en/pro-app/latest/sdk/api-reference/topic10294.html" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic10294.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example that shows how to hide a field from the inspector grid.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;  internal class CustomProvider : InspectorProvider
  {
    public override bool? IsVisible(Attribute attr)
    {
      if (attr.FieldName == "POP1990")
        return false;

      return true;
    }
  }
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And now when creating the inspector grid use the following&lt;/P&gt;&lt;LI-CODE lang="c"&gt;  var provider = new CustomProvider();
  _featureInspector = provider.Create();

  // create a new instance for the inspector
  // create an embeddable control from the inspector class to display on the pane
  var icontrol = _featureInspector.CreateEmbeddableControl();

 ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We don't currently have any support for the second part of your question - being able to highlight the columns that have been modified.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2023 23:50:37 GMT</pubDate>
    <dc:creator>NarelleChedzey</dc:creator>
    <dc:date>2023-05-19T23:50:37Z</dc:date>
    <item>
      <title>Customization in the attribute grid of Inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1290974#M9830</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using the Inspector class to display the attribute grid for any table for one oid using Load method of the inspector. But this will load the whole table with its columns and values. But I want to achieve 2 things:&lt;/P&gt;&lt;P&gt;1. Can we load the table for that one oid with some fixed columns with their values but not the whole table?&lt;/P&gt;&lt;P&gt;2. I have another button in my custom UI which will save some data not from the attribute grid but under the implementation of that button. So this button can update data for few of those default columns. Can we highlight those changed columns in some way for example can we make those column names as bold or some other way to highlight those columns which will tell that these are the modified columns?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/9021"&gt;@UmaHarano&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/17588"&gt;@CharlesMcLeod&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/54046"&gt;@NarelleChedzey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 14:11:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1290974#M9830</guid>
      <dc:creator>ShaneTsh</dc:creator>
      <dc:date>2023-05-19T14:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Customization in the attribute grid of Inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291165#M9833</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/54046"&gt;@NarelleChedzey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 17:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291165#M9833</guid>
      <dc:creator>ShaneTsh</dc:creator>
      <dc:date>2023-05-19T17:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Customization in the attribute grid of Inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291236#M9834</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First question is answered here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/view-or-modify-attributes-in-window-or-dock-pane/m-p/1065765" target="_self"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/view-or-modify-attributes-in-window-or-dock-pane/m-p/1065765&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 19:07:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291236#M9834</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-05-19T19:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Customization in the attribute grid of Inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291304#M9838</link>
      <description>&lt;P&gt;I think a 'RowTemplate' does a lot of the items on your punchlist:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Editing#creating-and-modifying-templates" target="_blank" rel="noopener"&gt;ProConcepts Editing · Esri/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp; shows a solution to turn visibility on/off&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 22:12:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291304#M9838</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-05-19T22:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Customization in the attribute grid of Inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291326#M9839</link>
      <description>&lt;P&gt;If you are using ArcGIS Pro 3.1 or higher there is also the InspectorProvider class that allows customization of field visibility, editability, display name, etc in the inspector when it is displayed as an embeddable control.&amp;nbsp; &amp;nbsp;These customizations are different from using the IDisplayTable to make the changes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://prodev.arcgis.com/en/pro-app/latest/sdk/api-reference/topic10294.html" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic10294.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example that shows how to hide a field from the inspector grid.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;  internal class CustomProvider : InspectorProvider
  {
    public override bool? IsVisible(Attribute attr)
    {
      if (attr.FieldName == "POP1990")
        return false;

      return true;
    }
  }
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And now when creating the inspector grid use the following&lt;/P&gt;&lt;LI-CODE lang="c"&gt;  var provider = new CustomProvider();
  _featureInspector = provider.Create();

  // create a new instance for the inspector
  // create an embeddable control from the inspector class to display on the pane
  var icontrol = _featureInspector.CreateEmbeddableControl();

 ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We don't currently have any support for the second part of your question - being able to highlight the columns that have been modified.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 23:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291326#M9839</guid>
      <dc:creator>NarelleChedzey</dc:creator>
      <dc:date>2023-05-19T23:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Customization in the attribute grid of Inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291342#M9841</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/54046"&gt;@NarelleChedzey&lt;/a&gt;&amp;nbsp; I tried to use the InspectorProvider but I am getting null reference exception when I am loading my table with a oid&lt;/P&gt;&lt;P&gt;inspectorProvider = new CustomInspectorProvider();&lt;BR /&gt;inspector = inspectorProvider .Create();&lt;BR /&gt;var embeddableControl = inspector .CreateEmbeddableControl();&lt;BR /&gt;inspectorViewModel = embeddableControl.Item1;&lt;BR /&gt;inspectorView = embeddableControl.Item2;&lt;/P&gt;&lt;DIV&gt;inspector.Load(table, oid); ---------------------&amp;gt; failing here on load with null reference exception&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;foreach (var attribute in inspector)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;inspectorProvider.IsVisible(attribute);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.NullReferenceException&lt;BR /&gt;HResult=0x80004003&lt;BR /&gt;Message=Object reference not set to an instance of an object.&lt;BR /&gt;Source=ArcGIS.Desktop.Editing&lt;BR /&gt;StackTrace:&lt;BR /&gt;at ArcGIS.Desktop.Editing.EditUtil.CallSynchronous(Func`1 f, Boolean validate)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 08:42:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291342#M9841</guid>
      <dc:creator>ShaneTsh</dc:creator>
      <dc:date>2023-05-20T08:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Customization in the attribute grid of Inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291453#M9842</link>
      <description>&lt;P&gt;Sorry.&amp;nbsp; You also need to override an additional method in your implementation of the InspectorProvider.&amp;nbsp; &amp;nbsp;Add the override for the AttributesOrder.&amp;nbsp; &amp;nbsp;See the code snippet below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also note that your add-in does not need to iterate through the attributes calling the IsVisible method after having loaded it.&amp;nbsp; The internal Pro code of the inspector control code calls the InspectorProvider methods.&amp;nbsp; &amp;nbsp;All the add-in needs to do is create the inspector from your provider, create the embeddable control and then load the row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;  internal class CustomProvider : InspectorProvider
  {
    public override bool? IsVisible(Attribute attr)
    {
      if (attr.FieldName == "POP1990")
        return false;

      return true;
    }

    public override IEnumerable&amp;lt;Attribute&amp;gt; AttributesOrder(IEnumerable&amp;lt;Attribute&amp;gt; attrs)
    {
      return attrs;
    }
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 00:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customization-in-the-attribute-grid-of-inspector/m-p/1291453#M9842</guid>
      <dc:creator>NarelleChedzey</dc:creator>
      <dc:date>2023-05-22T00:25:13Z</dc:date>
    </item>
  </channel>
</rss>

