This is a migrated thread and some comments may be shown as answers.

Hide Excel Export button in run time

1 Answer 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 09 Jun 2015, 11:51 PM

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?

 

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 10 Jun 2015, 08:58 AM

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
Tags
Grid
Asked by
Derek
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or