Is there a way to submit an authorization header with the ajax request on the client data bind? I cant seem to find anything that would allow me to do something like this
<script type="text/javascript"> //<![CDATA[ function ParameterMap(sender, args) { //If you want to send a parameter to the select call you can modify the if //statement to check whether the request type is 'read': //if (args.get_type() == "read" && args.get_data()) { if (args.get_type() != "read" && args.get_data()) { args.set_parameterFormat({ customersJSON: kendo.stringify(args.get_data().models) }); } } function Parse(sender, args) { var response = args.get_response().d; if (response) { args.set_parsedData(response.Data); } } function UserAction(sender, args) { if (sender.get_batchEditingManager().hasChanges(sender.get_masterTableView()) && !confirm("Any changes will be cleared. Are you sure you want to perform this action?")) { args.set_cancel(true); } } //]]></script><telerik:RadFormDecorator RenderMode="Lightweight" runat="server" DecorationZoneID="grid" DecoratedControls="All" EnableRoundedCorners="false" /> <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" ClientDataSourceID="RadClientDataSource1" AllowPaging="true" AllowSorting="true" > <MasterTableView ClientDataKeyNames="CustomerID" CommandItemDisplay="Top" BatchEditingSettings-HighlightDeletedRows="true"> <CommandItemSettings ShowAddNewRecordButton="false" /> <Columns> <telerik:GridBoundColumn DataField="Datetime" HeaderText="Customer ID" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PlantName" HeaderText="Company Name" ColumnEditorID="GridTextBoxEditor"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MachinName" HeaderText="Contact Name" ColumnEditorID="GridTextBoxEditor"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MachineID" HeaderText="Contact Title" ColumnEditorID="GridTextBoxEditor"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <DataBinding Location="http://localhost:2036/api/sample/" SelectMethod="100TEST" SortParameterType="Linq" FilterParameterType="Linq"> </DataBinding> <ClientEvents OnUserAction="UserAction" /> </ClientSettings> </telerik:RadGrid> </div> <telerik:GridTextBoxColumnEditor ID="GridTextBoxEditor" runat="server" TextBoxStyle-Width="230px"></telerik:GridTextBoxColumnEditor> <telerik:RadClientDataSource ID="RadClientDataSource1" runat="server" AllowBatchOperations="true"> <ClientEvents OnCustomParameter="ParameterMap" OnDataParse="Parse" /> <%-- <DataSource> <WebServiceDataSourceSettings BaseUrl="http://localhost:2036/api/sample/"> <Select Url="100TEST" DataType="JSON" /> <Update Url="UpdateCustomers" DataType="JSON" /> <Insert Url="InsertCustomers" DataType="JSON" /> <Delete Url="DeleteCustomers" DataType="JSON" /> </WebServiceDataSourceSettings> </DataSource>--%> <Schema> <Model ID="CustomerID"> <telerik:ClientDataSourceModelField FieldName="Datetime" DataType="String" /> <telerik:ClientDataSourceModelField FieldName="PlantName" DataType="String" /> <telerik:ClientDataSourceModelField FieldName="MachinName" DataType="String" /> <telerik:ClientDataSourceModelField FieldName="MachineID" DataType="String" /> </Model> </Schema> </telerik:RadClientDataSource>