C1DashboardLayout.SaveLayout: invisible panels

Posted by: wknauf on 30 August 2024, 8:28 am EST

  • Posted 30 August 2024, 8:28 am EST - Updated 30 August 2024, 8:34 am EST

    Hi C1,

    experimenting with the dashboard control: “SaveLayout” / “LoadLayout” does not contain the state of the hidden items. Is this intentional or a missing feature?

    Additional question: I thought about moving the setting for the visible items to an extra dialog and disable the option to hide items - this would have the benefit that we would not have to create invisible items. I can hide the toolbox button where items can be hidden:

    this.c1DashboardLayout1.Options.HeaderAppearance = C1.Win.Layout.HeaderAppearance.MaximizeButton;

    But I found not way to disable the context menu item:

    Setting the “C1DashboardLayout.Options.ContextMenuStrip” (https://developer.mescius.com/componentone/docs/win/online-dashboardlayout/creatingcustomcontextmenu.html) just modified the dropdown item of the tool icon button.

    Attached is my dashboard code sample - it is quite a mess ;-). Take a look at “FormSplit” - I decided to use the “Split” layout type.

    DashBoardTest.zip

    Best regards

    Wolfgang

  • Posted 2 September 2024, 2:45 am EST - Updated 4 September 2024, 8:12 am EST

    Hello Wolfgang,

    We have forwarded your concerns about the hidden state of items to the development team for further insights. Rest assured, we’ll update you once we have any information. [Internal Tracking ID: C1WIN-32884]

    For context menu, you can toggle ContextMenuStrip of C1.Win.SplitContainer.C1SplitContainer added to the C1DashboardLayout as follows:

    this.c1DashboardLayout1.Controls[0].ContextMenuStrip!.Opening += ContextMenuStrip_Opening;
    
    private void ContextMenuStrip_Opening(object? sender, System.ComponentModel.CancelEventArgs e)
    {
        var strip = (sender as ContextMenuStrip)!;
        e.Cancel = !strip.Items[0].Available || !strip.Items[1].Available;
    }

    Please refer to the attached modified sample for implementation. (see DashBoardTest_Mod.zip)

    Regards,

    Uttkarsh.

  • Posted 2 September 2024, 2:35 pm EST

    Thanks, this is easy!

    Still interested in the feedback about saving the visibility state to the saved layout.

    By the way: code blocks work only if they don’t contain any empty lines ;-). This is quite annoying in this forum.

    Best regards

    Wolfgang

  • Posted 3 September 2024, 6:14 am EST

    Hello Wolfgang,

    By the way: code blocks work only if they don’t contain any empty lines ;-). This is quite annoying in this forum.

    We have forwarded your concerns to the concerned team. Rest assured, we’ll update you once we have more information.

    Regards,

    Uttkarsh.

  • Posted 10 September 2024, 12:56 am EST

    Hello Wolfgang,

    As per the team,

    → If you are adding a single line of code block, then you can add it like the following:

    [code]..somecode..[/code]

    → If multiline of code, then:

    [code]
    .
    .
    somecode
    .
    .
    [/code]

    In my comment, I added my multiline code block with incorrcet format:

    [code].

    .

    somecode

    .

    .[/code]

    I have corrected it.

    Regards,

    Uttkarsh.

  • Posted 10 September 2024, 4:58 am EST

    Yes, multiline comments work only if no blank line is between the “code” blocks. I often see posts from other users where this happens - and in my own comments, I often have to fix it after submitting it ;-).

    So, would be great of the developers could improve the comment parsing code to also accept empty lines.

    Best regards

    Wolfgang

  • Posted 11 September 2024, 12:02 am EST

    Hello Wolfgang,

    Apologies for not explaining enough.

    As per the team, the empty line are supported in multiline code blocks. It’s just the format should be like the following:

    [code]
    first line
    
    third line
    fourth line
    
    sixth line
    
    [/code]

    The

     [code] 
    and
     
    [/code] should be on the first and last lines, respectively. There should not be any text on the first and line lines except these.

    Let me know if you have any other doubts.

    Regards,

    Uttkarsh.

  • Posted 11 September 2024, 12:07 am EST

    Hello Wolfgang,

    For C1WIN-32884 issue, the developers considered it a bug and the ETA for the fix is 2024v2 hotfix 1 or 2. Rest assured, we’ll update you once the issue is fixed.

    [Bug tracking ID: C1WIN-32924]

    Regards,

    Uttkarsh.

  • Posted 11 September 2024, 2:20 am EST - Updated 11 September 2024, 2:21 am EST

    I just tested with a longer code block, and it works perfectly now. Strange, I thought that empty lines caused issues. Maybe the developers fixed something without telling ;-).

    Best regards

    Wolfgang

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels