EnableViewState="true" ViewStateMode="Disabled".
But the issue is I want to use inline edit mode for insert and some other events are also not fired with disabled viewstate.
I would like to know what might go wrong with the radGrid and i am getting the above error?
This behavior is not observed on other ASP.Net pages on the site.
During testing, i just binded data to simple code like
<rad:RadGrid ID="grAccruals" runat="server" /> and got view state error
and I am able to display data with
<rad:RadGrid ID="grAccruals" runat="server" EnableViewState="true" ViewStateMode="Disabled"/>
Can anybody help me on debugging this issue? Which area I should look for to enable view state?
Thanks in advanced.
<
asp:DataList
ID
=
"_myControlDataList"
runat
=
"server"
OnDataBinding
=
"OnMyControlDataBind"
RepeatDirection
=
"Vertical"
BorderWidth
=
"0px"
CellPadding
=
"0"
CellSpacing
=
"0"
Width
=
"100%"
>
<
ItemTemplate
>
<
asp:LinkButton
runat
=
"server"
ID
=
"_myControlItemLink"
CommandName='<%# DataBinder.Eval(Container.DataItem, "CommandName") %>'
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "CommandArgument") %>'
OnCommand="OnItemCommand" ToolTip='<%# DataBinder.Eval(Container.DataItem, "ToolTip") %>' >
<
div
class
=
"toolbarPopupText"
>
<
img
class
=
"toolbarPopupIcon"
border
=
"0"
src='<%# DataBinder.Eval(Container.DataItem, "ImageUrl") %>' title='<%# DataBinder.Eval(Container.DataItem, "ToolTip") %>' />
<%# DataBinder.Eval(Container.DataItem, "Name") %>
</
div
>
</
asp:LinkButton
>
</
ItemTemplate
>
<
SeparatorTemplate
>
</
SeparatorTemplate
>
</
asp:DataList
>
<
tc:RadComboBox
ID
=
"_radComboBox"
runat
=
"server"
Key='<%# DataBinder.Eval(Container.DataItem, "Key") %>'
DataTextFormatString='<%# DataBinder.Eval(Container.DataItem, "Name") %>'
Width="250px"
Height="250px"
CssClass="stringBox"
AutoPostBack="true"
MarkFirstMatch="true"
EnableLoadOnDemand="true"
HighlightTemplatedItems="true"
EnableVirtualScrolling="true"
ShowMoreResultsBox="false"
ShowWhileLoading="true"
ShowDropDownOnTextboxClick="true"
OnSelectedIndexChanged="OnSelectedIndexChanged"
OnDataBinding="OnItemDataBind"
OnItemDataBound="OnItemDataBound"
OnItemsRequested="OnItemsRequested"
OnLoad="OnComboBoxLoad">
<
ItemTemplate
>
<
table
class
=
"directAccessTable"
>
<
tr
class
=
"directAccessTRName"
valign
=
"top"
>
<
td
rowspan
=
"2"
valign
=
"top"
>
<
asp:Image
runat
=
"server"
ID
=
"_status"
AlternateText=<%# DataBinder.Eval(Container.DataItem, "ImageText") %>
ImageAlign="Middle"
ImageUrl=<%# DataBinder.Eval(Container.DataItem, "ImageIcon") %>
ToolTip=<%# DataBinder.Eval(Container.DataItem, "ImageText") %>
Visible=<%# DataBinder.Eval(Container.DataItem, "ImageVisible") %> />
</
td
>
<
td
valign
=
"top"
><
span
class
=
"directAccessName"
><%# DataBinder.Eval(Container.DataItem, "Name") %></
span
></
td
>
</
tr
>
<
tr
valign
=
"top"
class
=
"directAccessTRDesc"
>
<
td
valign
=
"top"
><
span
class
=
"directAccessDescription"
><%# DataBinder.Eval(Container.DataItem, "Description")%></
span
></
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
tc:RadComboBox
>
POST http:
//localhost/Aplication/ 405 (Method Not Allowed) ScriptResource.axd:2
w.executeRequest ScriptResource.axd:2
w.executeRequest ScriptResource.axd:2
w.invoke ScriptResource.axd:2
e._onFormSubmit ScriptResource.axd:2
e._doPostBack ScriptResource.axd:2
w.createDelegate ScriptResource.axd:2
WebForm_DoPostBackWithOptions WebResource.axd:42
e._doPostBackWithOptions ScriptResource.axd:2
w.createDelegate ScriptResource.axd:2
(anonymous
function
) /Application/:1
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred
while
processing the request on the server. The status code returned from the server was: 405 ScriptResource.axd:2
w.create ScriptResource.axd:2
e._createPageRequestManagerServerError ScriptResource.axd:2
e._onFormSubmitCompleted ScriptResource.axd:2
w.createDelegate ScriptResource.axd:2
w.getHandler ScriptResource.axd:2
d ScriptResource.axd:2
w.completed ScriptResource.axd:2
b.Net.XMLHttpExecutor.f._onReadyStateChange
<
modules
>
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule"
preCondition
=
"integratedMode"
/>
<
add
name
=
"RadCompression"
type
=
"Telerik.Web.UI.RadCompression"
preCondition
=
"integratedMode"
/>
</
modules
>
<
handlers
>
<
add
name
=
"Telerik_Web_UI_WebResource_axd"
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_Web_UI_SpellCheckHandler_axd"
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_Web_UI_DialogHandler_aspx"
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"Telerik_RadUploadProgressHandler_ashx"
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler"
verb
=
"*"
preCondition
=
"integratedMode"
/>
<
add
name
=
"ASBXHandler"
verb
=
"GET,HEAD,POST"
path
=
"*.asbx"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
handlers
>
<
httpHandlers
>
<
add
path
=
"ChartImage.axd"
type
=
"Telerik.Web.UI.ChartHttpHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler"
verb
=
"*"
validate
=
"false"
/>
<
add
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
verb
=
"*"
validate
=
"false"
/>
</
httpHandlers
>
<
httpModules
>
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule"
/>
<
add
name
=
"RadCompression"
type
=
"Telerik.Web.UI.RadCompression"
/>
</
httpModules
>
protected
void rgdGrid_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
protected
override void OnPreRender(EventArgs e)
------------------------------------------
<
telerik:RadGrid ID="rgdGrid" runat="server" AutoGenerateColumns="False" Culture="en-GB"
ShowStatusBar="True" ShowFooter="False" OnUpdateCommand="rgdGrid_UpdateCommand"
OnEditCommand="rgdGrid_EditCommand"
OnItemDataBound="rgdGrid_ItemDataBound" OnCancelCommand="rgdGrid_CancelCommand"
AllowSorting="True" GroupingEnabled="False" OnSortCommand="rgdGrid_SortCommand"
Width="100%" ShowGroupPanel="True" Skin="Web20" MasterTableView-CellPadding="0"
MasterTableView-CellSpacing="0" CellPadding="0"
onitemcommand="rgdGrid_ItemCommand">
<MasterTableView EnableHeaderContextMenu="true" EditMode="InPlace" ItemStyle-Wrap="False"
CommandItemDisplay="TopAndBottom" >
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
</ExpandCollapseColumn>
<Columns>
-----------------------------------------------------
<
CommandItemTemplate>
<p style="text-align: right;">
<asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditAll" Visible="True"
Text="Edit" />
<asp:LinkButton ID="btnUpdate" runat="server" CommandName="UpdateAll" Visible="True"
Text="Update" />
</p>
</CommandItemTemplate>
DirectCast
(
Me
.Page.FindControl(
"WindowManager"
), RadWindowManager).RadAlert(
"Endereço foi salvo com sucesso."
, 330, 100,
"Sucesso"
,
"alertCallBackFn"
)
<
telerik:RadWindowManager
ID
=
"WindowManager"
runat
=
"server"
EnableShadow
=
"true"
EnableViewState
=
"false"
ReloadOnShow
=
"true"
>
<
ConfirmTemplate
>
<
div
class
=
"rwDialogPopup radconfirm"
>
<
div
class
=
"rwDialogText"
>
{1}
</
div
>
<
div
>
<
a
onclick
=
"$find('{0}').close(true);"
class
=
"rwPopupButton"
href
=
"javascript:void(0);"
><
span
class
=
"rwOuterSpan"
><
span
class
=
"rwInnerSpan"
>Sim</
span
></
span
></
a
> <
a
onclick
=
"$find('{0}').close(false);"
class
=
"rwPopupButton"
href
=
"javascript:void(0);"
><
span
class
=
"rwOuterSpan"
><
span
class
=
"rwInnerSpan"
>Não</
span
></
span
></
a
>
</
div
>
</
div
>
</
ConfirmTemplate
>
</
telerik:RadWindowManager
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock2"
runat
=
"server"
>
<
script
language
=
"javascript"
type
=
"text/javascript"
>
function alertCallBackFn(arg) {
CloseRadWindow();
}
function GetRadWindow() {
var oWindow = null;
if (window.radWindow)
oWindow = window.radWindow;
else if (window.frameElement.radWindow)
oWindow = window.frameElement.radWindow;
return oWindow;
}
function CloseRadWindow() {
var oWindow = GetRadWindow();
oWindow.argument = null;
oWindow.close();
return false;
}
</
script
>
</
telerik:RadCodeBlock
>