Hi Adam,
I assume you need to add an authorization header to the request made by the DataSource. Since this is not possible via the DataSource MVC wrapper, you need to manually add it to the underlying client DataSource object before reading the data. This post elaborates on the steps that you should take to implement this:
How to bind Kendo.MVC DataSource Read in WebApi using Ajax Request on Razor page
In short:
1. Set
AutoBind(false) in the Grid to prevent initial binding without the authorization header.
2. In the page where the Grid is, access the DataSource and add a
beforeSend handler that adds the authorization header.
3. Trigger a DataSource read.
The exact implementation inside the
beforeSend method and in your controller depends on the specifics of the external API requirements.
Regards,
Tsvetina
Progress Telerik