I want to hide the datasource

Posted by: ducn on 24 February 2021, 3:01 pm EST

  • Posted 24 February 2021, 3:01 pm EST

    Hi team,

    How can I set canEdit = false for the datasource?
    Do u have any example?

  • Replied 24 February 2021, 8:21 pm EST

    Hello, Duc,
    Please take a look at the example of the pre-defined resources setup that you can find at https://www.grapecity.com/activereportsjs/demos/features/designer-resources/purejs
  • Replied 25 February 2021, 1:19 pm EST

    Hi as case :
    - I load the report by file: designer.setReport({id:url})
    - After loading the report, I want to hide the icon add and edit for ( datasource, dataset). Can reportjs support it?

    Duc Nguyen
  • Marked as Answer

    Replied 25 February 2021, 10:29 pm EST

    There is no API that would allow you to hide the data panel, but I can offer you the brute-force solution. The data panel is just an HTML element, so you could hide by setting the CSS rules:

    .ar-data-panel .panel-group .panel:nth-child(1),
    .ar-data-panel .panel-group .panel:nth-child(2){
    display: none;

    I posted the example in the code sandbox:

    However, this is a short-term solution because we could change the UI structure in future versions and the CSS rules need to be modified accordingly.

    Do I understand correctly that you want to hide data binding details from the end-user? This is a valid scenario, so we should look at how we could bring this feature into the product.

Need extra support?

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

Learn More

Forum Channels