Page 1 of 1

StiMvcMobileDesigner rendering

Posted: Mon Oct 12, 2015 2:17 pm
by pritaeas
I have the following Razor partial layout:

Code: Select all

@using Stimulsoft.Report.MvcMobile
@using StiMvcBaseHelper = Stimulsoft.Report.MvcMobile.StiMvcBaseHelper

@StiMvcBaseHelper.Stimulsoft(Html).RenderMvcMobileDesignerScripts()

<div class="row">
    @StiMvcBaseHelper.Stimulsoft(Html).StiMvcMobileDesigner("StiMvcMobileDesigner",
    new StiMvcMobileDesignerOptions
    {
        ActionGetReportTemplate = "GetReportTemplate",
        ActionGetReportSnapshot = "GetReportSnapshot",
        ActionSaveReportTemplate = "SaveReportTemplate",
        ActionDesignerEvent = "DesignerEvent"
    })
</div>
It renders the designer div with an inline style like this:

Code: Select all

<div id="StiMvcMobileDesigner" style="left: 0px; top: 0px; right: 0px; bottom: 0px; position: absolute;">
The absolute positioning breaks my layout. How can I disable/change this rendering?

Re: StiMvcMobileDesigner rendering

Posted: Tue Oct 13, 2015 5:39 am
by HighAley
Hello.

Please, set Width and Height of the Designer.
You could set it to 100%.

Thank you.

Re: StiMvcMobileDesigner rendering

Posted: Tue Oct 13, 2015 7:28 am
by pritaeas
It renders differently, but please see the attached screenshot (IE11 but also in Opera32). The footer is now not at the bottom, and the designer page not visible at all.

Code: Select all

@StiMvcBaseHelper.Stimulsoft(Html).StiMvcMobileDesigner("StiMvcMobileDesigner",
    new StiMvcMobileDesignerOptions
    {
        ActionGetReportTemplate = "GetReportTemplate",
        ActionGetReportSnapshot = "GetReportSnapshot",
        ActionSaveReportTemplate = "SaveReportTemplate",
        ActionDesignerEvent = "DesignerEvent",
        Width = Unit.Percentage(100),
        Height = Unit.Percentage(100) // with and without this same problem
    })
screenshot
screenshot
stimvcmobiledesigner.jpg (138.1 KiB) Viewed 2246 times

Re: StiMvcMobileDesigner rendering

Posted: Tue Oct 13, 2015 10:04 am
by HighAley
Hello.

It hard to suggest any definitely solution having the srceen-shot and some parts of your code.
But we will try to guess. It seems that the Height of any parent element has not enough size.
Please, try to set the Height of all parent elements to 100% or set the fixed Height of the Designer.

Thank you.

Re: StiMvcMobileDesigner rendering

Posted: Tue Oct 13, 2015 1:24 pm
by pritaeas
Thanks for the suggestion. I'll see what I can come up with.

Is there a way to pass HtmlAttributes to my Razor code above? The reason I have it the way it is displayed is because if I don't use the alias, I get ambiguous reference between StimulSoft.Report.Mvc.StiMvcBaseHelper and StimulSoft.Report.MvcMobile.StiMvcBaseHelper.

Re: StiMvcMobileDesigner rendering

Posted: Wed Oct 14, 2015 8:09 am
by HighAley
Hello.
pritaeas wrote:Is there a way to pass HtmlAttributes to my Razor code above? The reason I have it the way it is displayed is because if I don't use the alias, I get ambiguous reference between StimulSoft.Report.Mvc.StiMvcBaseHelper and StimulSoft.Report.MvcMobile.StiMvcBaseHelper.
Could you describe this more detailed?
What attributes do you need to pass?
How id it connected with alias for StiMvcBaseHelper?

Thank you.

Re: StiMvcMobileDesigner rendering

Posted: Wed Oct 14, 2015 8:28 am
by pritaeas
Usually I'd write this instead:

Code: Select all

@Html.Stimulsoft().StiMvcMobileDesigner()
But if I do I get the ambiguous error stated above. I needed the alias to get it to work.

What I mean with the HtmlAttributes is that I can do this for example:

Code: Select all

@Html.TextBoxFor().HtmlAttributes(new { @class = "designer" })
But I cannot on the StimulSoft components.

B.t.w. I made another partial view with the @Html.Stimulsoft().StiMvcViewer and that one renders nicely within the same layout page, whereas the mobile designer does not.

Re: StiMvcMobileDesigner rendering

Posted: Thu Oct 15, 2015 9:24 am
by HighAley
Hello.

Unfortunately, we have no solution for the conflict between StiMvcViewer and StiMvcMobileDesigner when it is used on one view.

Thank you.

Re: StiMvcMobileDesigner rendering

Posted: Thu Oct 15, 2015 9:51 am
by pritaeas
It's not a big issue, but they are in separate (partial) views: DesignReport vs ShowReport, they do share the layout page. I'll leave it for now. If I get the chance to separate this into a small project, I'll report back. Thanks anyway.

Re: StiMvcMobileDesigner rendering

Posted: Fri Oct 16, 2015 7:28 am
by HighAley
Hello.

Please, let us know if you get any information about the issue.

Thank you.