<?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: matrix selection error on other visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/matrix-selection-error-on-other-visual/m-p/780133#M20570</link>
    <description>&lt;P&gt;finnally I'm solve this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank's to&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp; ae&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Custom-Visual-Selection/m-p/746946#M20083" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Custom-Visual-Selection/m-p/746946#M20083&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm remove the let builder definition and everything work properly&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2019 09:49:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-30T09:49:39Z</dc:date>
    <item>
      <title>matrix selection error on other visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/matrix-selection-error-on-other-visual/m-p/779775#M20564</link>
      <description>&lt;P&gt;hi power bi community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i try create selection with my matrix custom visual, but that make error on other visual&lt;/P&gt;&lt;P&gt;this is my transform, using builder withMatrixNode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function visualTransform(options: VisualUpdateOptions, host: IVisualHost): DataViewModel {

    let dataViews = options.dataViews[0];
    var rows = dataViews.matrix.rows;
    let listSelectionId: DataListSelection[] = [];
    let selectionIdBuilder = host.createSelectionIdBuilder();

    rows.root.children.forEach(x =&amp;gt; {
        listSelectionId.push({
            value: x.value,
            selectionId: selectionIdBuilder.withMatrixNode(x, rows.levels).createSelectionId()
        });

        if (x.children)
            x.children.forEach(z =&amp;gt; {
                listSelectionId.push({
                    value: z.value,
                    selectionId: selectionIdBuilder.withMatrixNode(z, rows.levels).createSelectionId()
                });
                if (z.children)
                    z.children.forEach(a =&amp;gt; {
                        listSelectionId.push({
                            value: a.value,
                            selectionId: selectionIdBuilder.withMatrixNode(a, rows.levels).createSelectionId()
                        });

                    })
            })
    });
    return {
        dataPoints: listSelectionId
    }
}&lt;/PRE&gt;&lt;P&gt;I'm already add click listener to get selection Id and make it selected in manager, and this is the console log&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="c-selection.PNG" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/188860i1BE55D4EE5567737/image-size/large?v=v2&amp;amp;px=999" role="button" title="c-selection.PNG" alt="c-selection.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but but my page always got error in other visual:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="c-selection-2.PNG" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/188861i732EF5774AFEF004/image-size/large?v=v2&amp;amp;px=999" role="button" title="c-selection-2.PNG" alt="c-selection-2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what wrong with my selection code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and one more question, I'm already declare selectcallback in my manager but never called when other visual make selection&lt;/P&gt;&lt;PRE&gt;        this.selectionManager = this.host.createSelectionManager();
        console.log('constructor allow interaction', this.host.allowInteractions);
        this.selectionManager.registerOnSelectCallback(() =&amp;gt; {
            console.log('selection manager callback', this.selectionManager.getSelectionIds());
        });
        this.selectionIdBuilder = options.host.createSelectionIdBuilder();&lt;/PRE&gt;&lt;P&gt;please help, I'm already strugling with this for 3 days&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 03:43:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/matrix-selection-error-on-other-visual/m-p/779775#M20564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-30T03:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: matrix selection error on other visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/matrix-selection-error-on-other-visual/m-p/780133#M20570</link>
      <description>&lt;P&gt;finnally I'm solve this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank's to&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp; ae&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Developer/Custom-Visual-Selection/m-p/746946#M20083" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Custom-Visual-Selection/m-p/746946#M20083&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm remove the let builder definition and everything work properly&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 09:49:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/matrix-selection-error-on-other-visual/m-p/780133#M20570</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-30T09:49:39Z</dc:date>
    </item>
  </channel>
</rss>

