Refresh dashboard?

Stimulsoft Dashboards.WEB discussion
Post Reply
TestBoy
Posts: 46
Joined: Tue Oct 23, 2018 8:14 pm

Refresh dashboard?

Post by TestBoy »

Identical to what is discussed here:
viewtopic.php?f=13&t=57213

But I get:

Uncaught ReferenceError: jsNetCoreViewer1 is not defined

I have no idea how to reference it?

It's defined in the page just like the example and it works fine otherwise, I just need a way to refresh it after I push new variables like a date range, etc.

Code: Select all

@Html.StiNetCoreViewer(new StiNetCoreViewerOptions()
{
    Actions =
    {
        GetReport = "GetReport",
        ViewerEvent = "ViewerEvent"
    }    
})
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Refresh dashboard?

Post by Lech Kulikowski »

Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
TestBoy
Posts: 46
Joined: Tue Oct 23, 2018 8:14 pm

Re: Refresh dashboard?

Post by TestBoy »

This is all it is...

Code: Select all

<button type="button" onclick="jsNetCoreViewer1.postAction('Refresh');" class="btn btn-primary" style="margin-left: 20px;" data-toggle="modal" id="submit">Refresh</button>
I don't think you need an entire application for a button?
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Refresh dashboard?

Post by Lech Kulikowski »

Hello,

Please check that you specify correct viewer ID:
use object with name js + viewer ID, by default - jsNetCoreViewer

Thank you.
TestBoy
Posts: 46
Joined: Tue Oct 23, 2018 8:14 pm

Re: Refresh dashboard?

Post by TestBoy »

Ok, so by chance I dropped the 1 from the end and it seems to work?

Is it supposed to have a 1?

It might work now but if it's supposed to have some ID number I don't want it to break later.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Refresh dashboard?

Post by Lech Kulikowski »

Hello,

The specified ID is formed as: 'js' + ID of component, where ID of component may be set when it created, by default 'NetCoreViewer':
@Html.StiNetCoreViewer("NetCoreViewer", new StiNetCoreViewerOptions()

Thank you.
Post Reply