This is a migrated thread and some comments may be shown as answers.

EnableViewState cause error

3 Answers 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amrutha
Top achievements
Rank 1
Amrutha asked on 14 May 2012, 01:46 PM
Hi Telerik Team,

I have a Hierarchical RadGrid in which i have set EnableViewState to false and binding using NeedDataSource event.Every thing works fine for the MasterTable, but for the Child Grid, when i tried to filter, causes an error.

ERROR: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Please help and this is urgent.

Ammu Nair.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 14 May 2012, 05:03 PM
Hi,

Can you please specify how the child grid is bound? Also verify that when the EnableViewState property of the grid is set to true the problem does not persist.

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Amrutha
Top achievements
Rank 1
answered on 15 May 2012, 08:21 AM
Hi Pavlina,

Error won't come when EnableViewState is set to true. The Grid is bound as if in this demo.

Ammu Nair
0
Pavlina
Telerik team
answered on 15 May 2012, 02:32 PM
Hello Ammu Nair,

Note that RadGrid does NOT manage the state for the following features when its EnableViewState property is set to false:           
  • Custom edit forms (user control or form template)
  • Filtering
  • Grouping
  • Expanded state of items in hierarchy

Therefore, to be able to filter your grid you should set the EnableViewState property to true.

More information about grid viewstate is available in the help article below:
http://www.telerik.com/help/aspnet-ajax/grid-viewstate-optimization.html

Greetings,

Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Amrutha
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Amrutha
Top achievements
Rank 1
Share this question
or