Please note that using RadAjaxManager simultaneously with RadAjaxPanel or UpdatePanel is not a supported scenario and we highly recommend to avoid such implementation.PLease try the sample code snippet.
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
EnableAJAX
=
"true"
runat
=
"server"
>
<
ClientEvents
OnRequestStart
=
"onRequestStart"
></
ClientEvents
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
</
telerik:AjaxUpdatedControl
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadWindowManager1"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadButton
ID
=
"Export"
runat
=
"server"
Text
=
"Export to Excel"
OnClientClicking
=
"OnClientClicking"
onclick
=
"Export_Click"
>
</
telerik:RadButton
>
<
telerik:RadGrid
ID
=
"RadGrid1"
GridLines
=
"None"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
PageSize
=
"10"
AllowAutomaticUpdates
=
"True"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
DataSourceID
=
"SqlDataSource1"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
MasterTableView
Width
=
"100%"
CommandItemDisplay
=
"TopAndBottom"
DataKeyNames
=
"ProductID"
DataSourceID
=
"SqlDataSource1"
HorizontalAlign
=
"NotSet"
AutoGenerateColumns
=
"False"
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
ItemStyle
CssClass
=
"MyImageButton"
></
ItemStyle
>
</
telerik:GridEditCommandColumn
>
<
telerik:GridBoundColumn
DataField
=
"ProductName"
HeaderText
=
"ProductName"
SortExpression
=
"ProductName"
UniqueName
=
"ProductName"
ColumnEditorID
=
"GridTextBoxColumnEditor1"
>
<
ColumnValidationSettings
EnableRequiredFieldValidation
=
"true"
>
<
RequiredFieldValidator
ForeColor
=
"Red"
Text
=
"*This field is required"
>
</
RequiredFieldValidator
>
</
ColumnValidationSettings
>
</
telerik:GridBoundColumn
>
<
telerik:GridDropDownColumn
DataField
=
"CategoryID"
DataSourceID
=
"SqlDataSource2"
HeaderText
=
"Category"
ListTextField
=
"CategoryName"
ListValueField
=
"CategoryID"
UniqueName
=
"CategoryID"
ColumnEditorID
=
"GridDropDownColumnEditor1"
>
</
telerik:GridDropDownColumn
>
<
telerik:GridNumericColumn
DataField
=
"UnitsInStock"
HeaderText
=
"Units In Stock"
SortExpression
=
"UnitsInStock"
UniqueName
=
"UnitsInStock"
ColumnEditorID
=
"GridNumericColumnEditor1"
>
</
telerik:GridNumericColumn
>
<
telerik:GridBoundColumn
DataField
=
"QuantityPerUnit"
HeaderText
=
"Quantity Per Unit"
SortExpression
=
"QuantityPerUnit"
UniqueName
=
"QuantityPerUnit"
Visible
=
"false"
EditFormColumnIndex
=
"1"
ColumnEditorID
=
"GridTextBoxColumnEditor2"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"Discontinued"
HeaderText
=
"Discontinued"
SortExpression
=
"Discontinued"
UniqueName
=
"Discontinued"
EditFormColumnIndex
=
"1"
>
</
telerik:GridCheckBoxColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"UnitPrice"
SortExpression
=
"UnitPrice"
UniqueName
=
"TemplateColumn"
EditFormColumnIndex
=
"1"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblUnitPrice"
Text='<%# Eval("UnitPrice", "{0:C}") %>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
span
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"tbUnitPrice"
Width
=
"40px"
DbValue='<%# Bind("UnitPrice") %>'>
</
telerik:RadNumericTextBox
><
span
style
=
"color: Red"
><
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator1"
ControlToValidate
=
"tbUnitPrice"
ErrorMessage
=
"*"
runat
=
"server"
>
</
asp:RequiredFieldValidator
></
span
> </
span
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this product?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
>
<
ItemStyle
HorizontalAlign
=
"Center"
CssClass
=
"MyImageButton"
></
ItemStyle
>
</
telerik:GridButtonColumn
>
</
Columns
>
<
EditFormSettings
ColumnNumber
=
"2"
CaptionDataField
=
"ProductName"
CaptionFormatString
=
"Edit properties of Product {0}"
InsertCaption
=
"New Product"
>
<
FormTableItemStyle
Wrap
=
"False"
></
FormTableItemStyle
>
<
FormCaptionStyle
CssClass
=
"EditFormHeader"
></
FormCaptionStyle
>
<
FormMainTableStyle
GridLines
=
"None"
CellSpacing
=
"0"
CellPadding
=
"3"
Width
=
"100%"
>
</
FormMainTableStyle
>
<
FormTableStyle
CellSpacing
=
"0"
CellPadding
=
"2"
Height
=
"110px"
></
FormTableStyle
>
<
FormTableAlternatingItemStyle
Wrap
=
"False"
></
FormTableAlternatingItemStyle
>
<
EditColumn
ButtonType
=
"ImageButton"
InsertText
=
"Insert Order"
UpdateText
=
"Update record"
UniqueName
=
"EditCommandColumn1"
CancelText
=
"Cancel edit"
>
</
EditColumn
>
<
FormTableButtonRowStyle
HorizontalAlign
=
"Right"
CssClass
=
"EditFormButtonRow"
></
FormTableButtonRowStyle
>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
>
</
telerik:RadWindowManager
>
<
br
/>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Northwind_newConnectionString3 %>"
DeleteCommand="DELETE FROM [Products] WHERE [ProductID] = @ProductID" InsertCommand="INSERT INTO [Products] ([ProductName], [CategoryID], [UnitPrice], [Discontinued], [QuantityPerUnit], [UnitsInStock]) VALUES (@ProductName, @CategoryID, @UnitPrice, @Discontinued, @QuantityPerUnit, @UnitsInStock)"
SelectCommand="SELECT [ProductID], [ProductName], [CategoryID], [UnitPrice], [Discontinued], [QuantityPerUnit], [UnitsInStock] FROM [Products] WITH(NOLOCK)"
UpdateCommand="UPDATE [Products] SET [ProductName] = @ProductName, [CategoryID] = @CategoryID, [UnitPrice] = @UnitPrice, [Discontinued] = @Discontinued, [QuantityPerUnit] = @QuantityPerUnit, [UnitsInStock] = @UnitsInStock WHERE [ProductID] = @ProductID">
<
DeleteParameters
>
<
asp:Parameter
Name
=
"ProductID"
Type
=
"Int32"
></
asp:Parameter
>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"ProductName"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"CategoryID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"UnitPrice"
Type
=
"Decimal"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Discontinued"
Type
=
"Boolean"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"QuantityPerUnit"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"UnitsInStock"
Type
=
"Int16"
></
asp:Parameter
>
</
InsertParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"ProductName"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"CategoryID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"UnitPrice"
Type
=
"Decimal"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Discontinued"
Type
=
"Boolean"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"QuantityPerUnit"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"UnitsInStock"
Type
=
"Int16"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"ProductID"
Type
=
"Int32"
></
asp:Parameter
>
</
UpdateParameters
>
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"SqlDataSource2"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:Northwind_newConnectionString3 %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Categories]">
</
asp:SqlDataSource
>