Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6586327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:46:37+00:00 2026-05-25T16:46:37+00:00

That’s right, an ASP.NET Ajax control in MVC. I know I know, there are

  • 0

That’s right, an ASP.NET Ajax control in MVC. I know I know, there are Telerik MVC controls but the Telerik MVC grid doesn’t have everything I need so I’m dead set on using the ASP.NET Ajax control.

Anyways, I have the RadGrid up and running great. The problem occurs when I enable all the bells and whistles such as paging, sorting, filtering etc. It looks like it puts the group by/filter/sort data in an eventargument post variable:

__EVENTARGUMENT  FireCommand:2$RadGrid1$ctl00;GroupByColumn;Dialog

In my case, when the page reloads, nothing changes. Is there something I should enable for this to work in MVC? I have followed the instructions at http://www.telerik.com/help/aspnet-ajax/mvc-getting-started.html but this doesn’t come up. The example in the previous url doesn’t have all the bells and whistles, so I’m assuming there are additional steps I need to take to get this to work.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:46:38+00:00Added an answer on May 25, 2026 at 4:46 pm

    I was able to find a solution to this, though it’s not very pretty. It uses a little reflection and hard coded mapping to tree of objects. Hopefully this will be a good starting point for anyone needing ViewState in MVC.

    Basically it involves deserializing the ViewState into an object then using reflection, call the Control’s LoadViewState with the right branch in the object’s tree.

        string viewState = Request.Form["__VIEWSTATE"];
    
        if (!string.IsNullOrEmpty(viewState))
        {
            LosFormatter formatter = new LosFormatter();
    
            object savedStateObject = formatter.Deserialize(viewState);
    
            MethodInfo method = grid.GetType().GetMethod("LoadViewState", BindingFlags.NonPublic | BindingFlags.Instance);
    
            // TODO: Find a less brittle/more elegant way to isolate the appropiate viewstate object for this control
            // In the case of Telerik's RadGrid, the key wasy find the tree that had an array of 13 objects
            method.Invoke(grid, new object[] { (((((((((savedStateObject as Pair).First as Pair).Second as Pair).Second as System.Collections.ArrayList)[1] as Pair).Second as System.Collections.ArrayList)[1] as Pair).Second as System.Collections.ArrayList)[1] as Pair).First });
        }
    
        string eventArgument = Request.Form["__EVENTARGUMENT"];
    
        if (!string.IsNullOrEmpty(eventArgument))
        {
            grid.RaisePostBackEvent(eventArgument);
        }
    

    See this post for more details: Supporting ViewState in an MVC ViewUserControl

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That standard demos for ASP.NET MVC 3 web site user managements include the following
I know there's a lot of other questions out there that deal with this
That's basically the question, is there a right way to implement operator<< ? Reading
That title is presumably awfully worded. I have some PostgreSQL tables. There is a
That sounds complicated, doesn't it... actually it's quite easy: I have a multi-language app
That might sound silly but can't do it myself :( Need your help guys.
That should be simple web site but with an editable tree. This tree will
That's what I wanna achieve : There will be dll which contains only methods
I have a French site that I want to parse, but am running into
That is, is there ever a case where a domain model should be available

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.