.net - Devexpress Grid - PerformCallback Generates Invalid Viewstate?

Dec 13, 2010

I have a DevExpress grid that needs to be refreshed every time the value in a combobox is changed. For example, I have a combobox that sets the grid's page size. One of the requirements is that the combobox does not cause a full postback.

The combobox is declared like this:

<asp:DropDownList ID="cboPages" AutoPostBack="false" runat="server"
EnableViewState="false" OnSelectedIndexChanged="cboPages_SelectedIndexChanged" />

On selected index changed, it sets a cookie whose value is the selected value. When the combobox value changes, a javascript function is called:

function PerformCallbackOnGrid(grid) {
try {

The function is attached in code behind: this.cboPages.Attributes["onChange"] = "PerformCallbackOnGrid(" + this.GridClientID + ")";

After performing these steps:The user changes the grid page size using the combobox, so PerformCallback is called at least once.

The user presses F5(refresh).
The user tries to change the page size again.
an 'Invalid viewstate' error message appears.

I have tried setting ViewStateMode to Disabled for the grid, also EnableViewState="false".

View 2 Replies

Similar Messages:

DevExpress Generates Thousands Of Lines Of ASP Code / How To Reduce The Code,

Nov 24, 2010

After insert a grid or any other tool into an aspx page it generates enough code for that tool(for ex.): <dx:ASPxGridView ID=ASPxGridView1 runat="server"></dx:ASPxGridView>...

But,after adding any property to this control (like Show group Panel) it generates more than 3000 lines of code in aspx page () and after adding any other tool the code is increasing in a enormous way...

How can I reduce the code, maybe there is a property(settings) in DevExpress option...

View 2 Replies

ViewState - Empty Placeholder Generates View State?

Jan 1, 2011

On my web-page I have PlaceHolder, not controls are loaded into it.

<asp:PlaceHolder ID="PlaceHolderStatMain" runat="server">

I am looking the ViewState generated for the page, it is the following:


When I set EnableViewState to false:

<asp:PlaceHolder ID="PlaceHolderStatMain" runat="server" EnableViewState="false">

The viewstate content was decreased significantly:

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTg1NDkyNTUzZGTTn8Y28VwmpE/K7yPPkLFvhrqMdU8THijFW/BMFzk0tQ==" />

Question: how to remove 'useless' viewstate content without disabling viewstate for placeholder himself (I would like other control loaded into placeholder to has viewstate)?

Is it possible at all?

View 1 Replies

How To Use Grid With Check Box In DevExpress

May 12, 2010

How to use Grid with check box in devExpress . i have grid with data i want to get the valuse if the check box is checked

View 2 Replies

.net - Invalid Viewstate Error - OnPreRender?

Jan 19, 2010

I'm getting 100+ errors per day on my website with System.Web.HttpException: Invalid viewstate. The website is asp.net 3.5 running on iis6 , not running in a web-garden/web-farm , single server.Here are a few sample errors.

Machine: ML Framework Version: 2.0.50727.3603 Assembly Version: 6.5.3664.33889
Source: http://www.domain.com/WebResource.axd?d=z5VmXXoSLLpQHoPictureAlert
Exception: System.Web.HttpException: Invalid viewstate. at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) at

i already tried wraping all inline javascript with //<![CDATA[ //]]>

i already set enableViewStateMac to false.From looking at all the errors guessing out of the "d" paramter it seems to focus on a single usercontrol on my website.in this control i change the visiblity of div's + text in the usercontrol OnPreRender function.

protected override void OnPreRender(EventArgs e)
Can the errors be related to the usercontrol behavioral?

View 2 Replies

Invalid Viewstate Error EVENT # 31890?

Jul 23, 2010

got this error.solve this?

EVENT # 31890

EVENT LOG Application




View 1 Replies

State Management :: Viewstate Verification Failed - Invalid

Aug 9, 2010

I am having this problem with, it seems, Viewstate. This issue only occurs on certain machines, if I browse the website myself it works fine but if another user browses the pages they will lock up and timeout with the error "Viewstate verification failed. Reason: Viewstate was invalid." appering in the event log. Full error is as follows:

Event code: 4009
Event message: Viewstate verification failed. Reason: Viewstate was invalid.
Event time: 8/9/2010 12:09:17 PM
Event time (UTC): 8/9/2010 11:09:17 AM
Event ID: 343dfca250394b109bb5d03b2324f04a
Event sequence: 103
Event occurrence: 4
Event detail code: 50204
Application information:
Application domain: /LM/W3SVC/1/Root/AnseoEnterprise-3-129258250982968750
Trust level: Full
Application Virtual Path: /AnseoEnterprise

View 3 Replies

State Management :: System.Web.UI.ViewStateException: Invalid Viewstate?

Oct 15, 2010

I had to switch to



View 2 Replies

Invalid Viewstate Since Oracle Padding Vulnerability Security Patch

Sep 29, 2010

Since installing the security patch for the ASP.NET Oracle Padding vunerability any user that was keeping themselves logged in to our site is getting error messages when hitting any page.

The errors logged on the server are

System.Web.UI.ViewStateException: Invalid viewstate.
Client IP: xxx.xxx.xxx.xxx
Port: 55796
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
ViewState: l4nsXEvWcOwlDpmdbxw916bpHoPiqdBP7Syb+zCQAv44xv/r3oLtETKTL28/Gts6
Referer: Path: /product/4795/fender-usa-deluxe-stratocaster-mn-olympic-white-pearl

With custom errors switched off a user sees the following information

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: [ViewStateException: Invalid viewstate.
Client IP: xxx.xxx.xxx.xxx
Port: 3588
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.5; .NET CLR 2.0.50727; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
ViewState: s0toPCu7bxkB7a3G+KTxawY3ILf1qunZyIqNBKg8xSoqY2BkWIUCJAHKFKo2RnJw
Path: /]

[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]

System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +118
System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +13
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +238
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +5
System.Web.Mvc.AntiForgeryDataSerializer.Deserialize(String serializedToken) +90

to delete all cookies and log back in, but obviously an average user, won't know to do this and I'm worried they will just think our site is broken.

View 3 Replies

PerformCallback On ASPxCallbackPanel Doesn't Seem To End?

Mar 17, 2011

We are using the ASP.NET controls from DevExpress.

In our application we use the ASPxCallbackPanel control at various places. the callback is triggered by "CallbackPanel.PerformCallback (...)" inside a handler of ClientSideEvents.ValueChanged .

Sometimes, and only when using Internet Explorer, the loading bar and the form gets locked. We do not get any server error - the client is just showing the loading bar, and doesn't stop.

The recommended error handling for callback errors is set in our Web.Config as follows:

<remove name="ScriptModule"/>
<remove name="ASPxHttpHandlerModule"/>


Unfortunately, we can not really reproduce the error. It just occurs sometimes. Is there a way to set a timeout on a callback, so that the loading bar disappears after about 30 seconds? Or ist there a way to redirect to a special error page in the case of a hang?

View 1 Replies

Using JQuery With DevExpress

Nov 20, 2010

I'm trying to include jQuery in an ASP.NET web site that also uses DexExpress controls, but no matter how I include my script, the $ function is always anonymous and the jQuery function is undefined. I suspect the DevExpress 'plumbing' script is overriding jQuery.

View 2 Replies

Use Both DevExpress And Telerik On The Same Webpage?

Oct 7, 2010

Will there be any problems if I use DevExpress controls and Telerik controls on the same web page. Imagine I am nesting them insider one another.

I am wondering if they would conflict each other during AJAX calls.

View 1 Replies

.net - Devexpress Intelisense In Markup?

Aug 26, 2010

Ive got problem with intellisense in markup for example:

When I type

<dxwgv:ASPxGridView ID="grid" runat="server">
< -- here I hit ctrl + space and only normla html tags are shown: a, abbr ... --
But I would like to have available columns instead :/
</ dxwgv:ASPxGridView>

View 1 Replies

State Management :: Failed To Load Viewstate. The Control Tree Into Which Viewstate Is Being Loaded Must Match ?

Oct 9, 2010

Now here is the weird thing. First i am running it locally on the built in vs2008 web server.I load my control in fine, do a postback from a linkbutton, locally on my machine it all works fine, no issue.However when it goes onto my host, it falls over with the message:

Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.Now i also load controls dynamically and use postbacks and things in the admin area of the site...and that works fine, however my front end just keeps failing? See the code behing below:


View 1 Replies

C# - Calculate SubTotal In Devexpress Gridview?

Mar 20, 2011

I have a simple Devexpress Gridview.

Here code;


Is there any way calculate sub total of Unit Price column in Devexpress?

For this example; I just want total of Unit Price column (18 + 19 + 4.5 + 14 + 18 + 263.5 + 18 + 46 + 14 + 14 + 15 = 430) in the bottom..

How can i do that?

View 2 Replies

C# - Access Object From Javascript DevExpress?

Aug 24, 2010

I wonder why I cant access Object by ClientInstanceName from javascript.


function NextStep(pageControl) {
currentStep = pageControl.GetActiveTabIndex();
switch (currentStep) {
case 0:
selectedRowsCount = GridViewClient.GetSelectedRowCount();

The error is:

There is no definition for GridViewClient;
but ClientInstanceName is set to GridViewClient

Case is that I have thos grid on other tabs in ASPxPageControl so that these aren't visible but What I want to do is to refresh one of it before displaying it and I wanted to use client side ASPxGridViewClient.Refresh().

View 3 Replies

DevExpress AspxGridView Filter In ObjectDataSource

Mar 16, 2010

One Page In the Page, a custom control In the custom Control, a AspxDropDown The AspxDropDown, has a DropDownWindowTemplate In the DropDownItemTemplate, I add a GridView and a paging/sorting/filtering enabled ObjectDataSource When handling the Selecting event of the ObjectDataSource, I should set filter parameters for the datasource. There filter parameters should come from the FilterRow of the AspxGridView (preferably using the AspxGriedView.FilterExpression property). The problem: the AspxGriedView.FilterExpression property is not set to the proper values (set by the user). Did anyone find a good implementation of what I'm trying to do here?

View 1 Replies

Using Devexpress HtmlEditor Control Has DXR.axd Throwing 404?

Oct 8, 2010

I am using a dev express control: ASPxHtmlEditor version 10.1. I am trying to create a simple that only has this control. Unfortunately the control does not render with any of its styles or images loaded. This happens over 20 times. The control does not have any of its styles and all of its images do not load on the control.

I am getting 404 exceptions similar to: "Failed to load source http://localhost:11238/DXR.axd?r=5_0"

View 2 Replies

State Management :: ViewState And ObjectDataSource / Getting Values From Viewstate In GetTopThemes?

Jan 11, 2011

I have problem getting values from viewstate in GetTopThemes.





when the page is not Posted back, I saved all values in the viewstate.

View 2 Replies

JQuery :: Grid 3.6 / Get The Error Message As "URL Not Set" Or "Invalid Argument"?

Nov 12, 2010

I am using Jqgrid3.6 integrated with .net application and its working fine for all the features except the row delete . i.e. When i have multiselect option and if i delete all the rows at that time i get the error message as "URL Not Set" or "Invalid Argument". Can any body tell me what can be the issue and how to resolve the same

View 1 Replies

State Management :: ViewState - Does The Master Page Have Its Viewstate

Apr 30, 2010

I have been getting this error a lot lately with some of my users, and I had a couple of concerns with view state and I have read so many articles but I am still lost..

1. I use masterpage on all the pages and I need viewstate for some of the pages but..

There is a page where a user will fill out the information and then submit this data to a cgi server, and it is where I get most of the Client Disconnected errors, what would happen if I disable viewstate when they click on that button?

Now when a user browses from one page to another, does the view state from the previous page get deleted? If not how would I delete it?

Does the master page have its own viewstate? Would I be able to make sure none of items on my master page are using the viewstate?

View 7 Replies

C# - Page With ViewState Disabled Still Be Validating A Viewstate Field?

Sep 24, 2010

I have a shopping cart page (Cart.aspx) that has a button that will (sometimes) post to a third party payment gateway, if payment is necessary. The payment gateway will process the payment and then do a silent post to my website (Order.aspx) so I can update the order status.

Order.aspx always throws an invalid viewstate error, even though viewstate is disabled on the page.

What's happening is that Cart.aspx (which has viewstate enabled) posts to the payment gateway, and the gateway will post it back as part of the silent post. Even though Order.aspx has viewstate disabled and validation disabled, it still tries to validate the __viewstate field it's being given.

I know setting EnableViewState=false will disable the rendering of the __viewstate field, but if another page provides the field, shouldn't it still skip validation? I tried calling ViewState.Clear() on the Page_Init event of Order.aspx, but ViewState is apparently empty. how to get around this? I don't want to disable ViewState on Cart.aspx (in some cases it may be necessary), but I can't figure out how to clear it on Order.aspx.

View 1 Replies

Looking For Devexpress PivotGrid/PivotTable For Java Webapp?

Jan 26, 2011

I've just been looking around a little at the Devexpress PivotGrid/PivotTable and wow, I'm impressed (see here for an example, skip towards end to see some of the functionality).

I'm working on a java webapp in which the tabular data presented is the key part of the application, and if I could implement something such as the Devexpress control that would be amazing. Is there anything out there?? The java webapp uses the myfaces framework.

View 2 Replies

Preserve Paging With The DevExpress MVCxGridView Control?

Jan 12, 2011

I'm working with the 10.2 version of the DevExpress MVC controls. I have a page hosting a MVCxGridView and I need to preserve the current page when navigating away and back to this particular page.

I can see from the old ASPxGridView documentation that there's a PageIndex property, but this seems to only be accessible from a WebForms/Code Behind/Server Control type context. I'm using MVC and can't figure out how to preserve this page setting.

I've tried the cookie settings with the control but those don't seem to persist for me.

View 1 Replies

C# - How To Highlight Focused Row In DevExpress Gridview On Click

Aug 13, 2010

I have a devexpress gridview one of the column contains url. I need on url clik highlight this row and if user click another url in another row highlight and unselect previous.

View 1 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved