<?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 Custom Visuals Table control with selection in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/134131#M4625</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very new to all this so please be gentle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a table control which allows the selection of a row so that dataselected is fired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have look at the tutorial for barchart and, although not a table, it does implement this in the fashion I need. I therefore tried to adapt the GridNode to implement the same code in the barchart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run into a few problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1/ The barchart implements visualTransform but does not use table for the dataViewMappings. How do I implement this for a table?&lt;/P&gt;&lt;P&gt;2/ How do I implement host.createSelectionIdBuilder()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 06:45:00 GMT</pubDate>
    <dc:creator>bibble235</dc:creator>
    <dc:date>2017-02-28T06:45:00Z</dc:date>
    <item>
      <title>Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/134131#M4625</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very new to all this so please be gentle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a table control which allows the selection of a row so that dataselected is fired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have look at the tutorial for barchart and, although not a table, it does implement this in the fashion I need. I therefore tried to adapt the GridNode to implement the same code in the barchart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run into a few problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1/ The barchart implements visualTransform but does not use table for the dataViewMappings. How do I implement this for a table?&lt;/P&gt;&lt;P&gt;2/ How do I implement host.createSelectionIdBuilder()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 06:45:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/134131#M4625</guid>
      <dc:creator>bibble235</dc:creator>
      <dc:date>2017-02-28T06:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/134848#M4650</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22509"&gt;@bibble235&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on my research, you may start with &lt;A href="https://github.com/Microsoft/PowerBI-visuals-tools/tree/master/templates/visuals/table" target="_self"&gt;table template&lt;/A&gt; to implement the &lt;A href="https://github.com/Microsoft/PowerBI-visuals-tools/blob/master/templates/visuals/.api/v1.5.0/PowerBI-visuals.d.ts" target="_self"&gt;API&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 08:13:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/134848#M4650</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-03-01T08:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/134932#M4651</link>
      <description>&lt;P&gt;Thanks for taking the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will look at this, using selection manager with table does seeem a popular subject.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to compile the grid control at the latest api and it fails with the RangeError checkExoression which is googleable. Tried latest typescript with no joy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 09:54:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/134932#M4651</guid>
      <dc:creator>bibble235</dc:creator>
      <dc:date>2017-03-01T09:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/135288#M4656</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not used templates before. How do you used this. I have copied the files to a new project and built but I do not see any data only the headers for the table. This is because the model is never populated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dd look for template and power bi but it only gave me information on the depreciated repository.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 22:28:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/135288#M4656</guid>
      <dc:creator>bibble235</dc:creator>
      <dc:date>2017-03-01T22:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/135347#M4659</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22509"&gt;@bibble235&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just like &lt;A href="https://github.com/Microsoft/PowerBI-visuals/blob/master/RVisualTutorial/CreateNewVisual.md" target="_self"&gt;creating a new R Powered Custom Visual&lt;/A&gt;, use -t table.&lt;/P&gt;&lt;PRE&gt;pbiviz new sampleTableVisual -t table&lt;/PRE&gt;&lt;P&gt;As for the error message you mentioned above, check &lt;A href="https://github.com/Microsoft/PowerBI-visuals/issues/136" target="_blank"&gt;https://github.com/Microsoft/PowerBI-visuals/issues/136&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 02:28:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/135347#M4659</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-03-02T02:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/135533#M4669</link>
      <description>&lt;P&gt;Thanks useful stuff about the templates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For data which is very simple&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table.png" style="width: 236px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/31380iD98B036BD563346E/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.png" alt="table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data mappings are&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    "dataViewMappings": [{
        "table": {
                "rows": {
                    "for": { "in": "Values" },
                    "dataReductionAlgorithm": { "top": { "count": 30000000 } }
                },
                "rowCount": { "preferred": { "min": 1 } }
            }
    }],&lt;/PRE&gt;&lt;P&gt;What I want to achieve is a sortable table with a ISelectionId but there does not seem to be any way to create a selection builder as it does not seem to want to take a table as an argument and seems to only support categorical mappings which I do not use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let mySelectionId = host.createSelectionIdBuilder()
	.withCategory(myCategory, myCounter)
        .createSelectionId()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The gridNode comes close to what I want and I can select a row attribute but the control is all in javascript as there is no SeclectionId&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 09:34:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/135533#M4669</guid>
      <dc:creator>bibble235</dc:creator>
      <dc:date>2017-03-02T09:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/136106#M4685</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22509"&gt;@bibble235&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's why I introduced the table template.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 03:05:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/136106#M4685</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-03-03T03:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/136955#M4707</link>
      <description>&lt;P&gt;This is not resolved. Using the example below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="excel.png" style="width: 381px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/31711i0944D2956C50B3DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="excel.png" alt="excel.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot create a report which looks like the above using the template table suggested. Here is what I see.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pbix.png" style="width: 568px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/31713iA6F20982459FBACE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pbix.png" alt="pbix.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which you can see does not meet my needs. It could be that I am misusing the template but I have done nothing but build it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried also to&lt;/P&gt;&lt;P&gt;a) Try and raise a custom event to mimick the barChart selection manager&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) Build a table using the DataViewMappings table e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
	"dataRoles": [{
		"displayName": "Column1",
		"name": "Column1",
		"kind": "GroupingOrMeasure"
	},
	{
		"displayName": "Column2",
		"name": "Column2",
		"kind": "GroupingOrMeasure"
	}],
    "dataViewMappings": [{
        "table": {
			"rows": {
				"select": [
					{
						"for": 
						{ 
							"in": "Column1" 
						}
					},
					{
						"for": 
						{ 
							"in": "Column2" 
						}
					},
					{
						"bind": 
						{
							"to": "Column2"
						}
					}
				]
			}
		}
    }]
}&lt;/PRE&gt;&lt;P&gt;The table builds and displays successfully but does not raise the custom event when an item is selected. The click is fired as I can see this when debugging. i,e, the debugger stops on the debugger statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            let bars = this.tBody.selectAll('tr').data(tableViewModel.dataPoints);
			
            let selectionManager = this.selectionManager;

            bars.enter();
			
            bars.on('click', function(d) {
                selectionManager.select(d.selectionId).then((ids: ISelectionId[]) =&amp;gt; {
					console.log(d.selectionId);
					debugger;
                });

                (&amp;lt;Event&amp;gt;d3.event).stopPropagation();
            });
			
            bars.exit()
               .remove();
			&lt;/PRE&gt;&lt;P&gt;However the dataSelected event which I see fired when an item is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this all makes sense&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iain&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2017 22:31:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/136955#M4707</guid>
      <dc:creator>bibble235</dc:creator>
      <dc:date>2017-03-05T22:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals Table control with selection</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/138664#M4784</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22509"&gt;@bibble235&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead, you may use try...catch statement for troubleshooting.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 10:32:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-Table-control-with-selection/m-p/138664#M4784</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-03-08T10:32:39Z</dc:date>
    </item>
  </channel>
</rss>

