Ext.Net MVC - how to populate page controls

  1. #1

    Ext.Net MVC - how to populate page controls

    Hi,

    I have some controls (selectbox, treegrid, etc) on my view page and I'm wondering how I pass data to them from the controller so that they are populated when the page loads.

    For example, I would think of doing this for the selectbox:

    View:

    <%: Html.DropDownList("Months", (SelectList)ViewData["Months"])%>
    Controller:

     public ActionResult Index()
     {
               var months = GetMonths();
               ViewData["Months"] = new SelectList(months, "Id", "Name");
               return View();
     }
    However, I'm not sure how to achieve the same with Ext.
    Last edited by fordprefect; Apr 29, 2011 at 10:41 PM.
  2. #2
    I was able to solve this issue by calling AjaxResult from my view and using store.loadData with the result set.

Similar Threads

  1. Replies: 1
    Last Post: Sep 02, 2011, 4:39 AM
  2. Replies: 2
    Last Post: Feb 16, 2011, 9:10 AM
  3. Replies: 0
    Last Post: Jan 05, 2011, 6:48 AM
  4. Page Render - Controls all strange
    By Tbaseflug in forum Bugs
    Replies: 0
    Last Post: Jun 26, 2009, 1:27 PM
  5. AutoLoad Panel Populate Child Page Error
    By camus92 in forum 1.x Help
    Replies: 5
    Last Post: Mar 09, 2009, 4:08 PM

Tags for this Thread

Posting Permissions