Hide Excel Export button in run time

2 posts, 0 answers
  1. Derek
    Derek avatar
    104 posts
    Member since:
    Aug 2008

    Posted 09 Jun 2015 Link to this post

    Hi 

    How can I hide the Excel Export button in runtime? Depending on the logged in user I have to hide and show the Export Excel button.

    Would you have some sample code?

     

  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2311 posts

    Posted 10 Jun 2015 Link to this post

    Hello Derek,

    You could add the condition in the Grid configuration.
    E.g.

    .ToolBar(tools =>
    {
        if (<condition>)
        {
            tools.Excel();
        }
    })

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top