<?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: Splunk Dashboard Examples: How can I implement the table row expansion? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319463#M38189</link>
    <description>&lt;P&gt;Its working for me actually. Only sort is not working for me.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2019 11:05:55 GMT</pubDate>
    <dc:creator>rshah_splunk</dc:creator>
    <dc:date>2019-02-07T11:05:55Z</dc:date>
    <item>
      <title>Splunk Dashboard Examples: How can I implement the table row expansion?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319460#M38186</link>
      <description>&lt;P&gt;Trying to adopt the example table row expansion from Dashboard examples app. In the example a chartview is used which I've replaced with a tableview. The row expansion only seems to work correctly the first time then not after that. Example is where expanded data spans &amp;gt; 1 page. The prev/next page buttons work the first time but if another row is expanded after that they no longer work. The same issue applies using a hyperlink (the link works on the first expansion only).&lt;BR /&gt;
Sample js from Dashboard Examples using tableview.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/chartview',
    'splunkjs/mvc/searchmanager',
    'splunkjs/mvc',
    'underscore',
    'splunkjs/mvc/simplexml/ready!'],function(
    TableView,
    ChartView,
    SearchManager,
    mvc,
    _
    ){
    var EventSearchBasedRowExpansionRenderer = TableView.BaseRowExpansionRenderer.extend({
        initialize: function(args) {
            // initialize will run once, so we will set up a search and a chart to be reused.
            this._searchManager = new SearchManager({
                id: 'details-search-manager',
                preview: false
            });
            this._chartView = new TableView({
                managerid: 'details-search-manager',
                'charting.legend.placement': 'none'
            });
        },
        canRender: function(rowData) {
            // Since more than one row expansion renderer can be registered we let each decide if they can handle that
            // data
            // Here we will always handle it.
            return true;
        },
        render: function($container, rowData) {
            // rowData contains information about the row that is expanded.  We can see the cells, fields, and values
            // We will find the sourcetype cell to use its value
            var sourcetypeCell = _(rowData.cells).find(function (cell) {
               return cell.field === 'sourcetype';
            });
            //update the search with the sourcetype that we are interested in
            this._searchManager.set({ search: 'index=_internal earliest=-1m latest=now sourcetype=' + sourcetypeCell.value + ' | timechart count'});
            // $container is the jquery object where we can put out content.
            // In this case we will render our chart and add it to the $container
            $container.append(this._chartView.render().el);
        }
    });
    var tableElement = mvc.Components.getInstance("expand_with_events");
    tableElement.getVisualization(function(tableView) {
        // Add custom cell renderer, the table will re-render automatically.
        tableView.addRowExpansionRenderer(new EventSearchBasedRowExpansionRenderer());
    });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 01:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319460#M38186</guid>
      <dc:creator>t183194</dc:creator>
      <dc:date>2017-12-05T01:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Examples: How can I implement the table row expansion?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319461#M38187</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You can try replacing line 21-24 in your code with the below contents.&lt;/P&gt;

&lt;P&gt;this._chartView = new TableView({&lt;BR /&gt;
                managerid: 'details-search-manager',&lt;BR /&gt;
                count: 10,&lt;BR /&gt;
                dataOverlayMode: "none",&lt;BR /&gt;
                drilldown: "none",&lt;BR /&gt;
                rowNumbers: "false",&lt;BR /&gt;
                wrap: "true",&lt;BR /&gt;
            });&lt;/P&gt;

&lt;P&gt;This worked for me...!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 09:04:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319461#M38187</guid>
      <dc:creator>rshah_splunk</dc:creator>
      <dc:date>2019-02-06T09:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Examples: How can I implement the table row expansion?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319462#M38188</link>
      <description>&lt;P&gt;Hi. Thanks for the idea but the issue occurs after the initial expansion. Subsequent collapses/expansions work ok but the next/prev page &amp;amp; hyperlink functions don't  work after the initial expansion.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 21:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319462#M38188</guid>
      <dc:creator>t183194</dc:creator>
      <dc:date>2019-02-06T21:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Examples: How can I implement the table row expansion?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319463#M38189</link>
      <description>&lt;P&gt;Its working for me actually. Only sort is not working for me.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 11:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/319463#M38189</guid>
      <dc:creator>rshah_splunk</dc:creator>
      <dc:date>2019-02-07T11:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Examples: How can I implement the table row expansion?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/517811#M63319</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/153728"&gt;@rshah_splunk&lt;/a&gt;&amp;nbsp; I actually need help on a similar kind of problem, Is it possible to have a two-level of row expansions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 19:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/517811#M63319</guid>
      <dc:creator>iamkilarunaresh</dc:creator>
      <dc:date>2020-09-03T19:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Dashboard Examples: How can I implement the table row expansion?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/528517#M64138</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/114284"&gt;@t183194&lt;/a&gt;&amp;nbsp;Did you get the solution for this problem? I am facing the exact same problem with table row expansion having data scattered over different pages.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 11:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Dashboard-Examples-How-can-I-implement-the-table-row/m-p/528517#M64138</guid>
      <dc:creator>nagar57</dc:creator>
      <dc:date>2020-11-09T11:11:45Z</dc:date>
    </item>
  </channel>
</rss>

