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

Binding Grid to external DropDownlist problem?

0 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
KooterB
Top achievements
Rank 1
KooterB asked on 09 Dec 2010, 06:01 PM
Essentially My goal is to bind a dropdownlist from a partial view in my Index view to a gridview I have setup like this:

  <% Html.RenderPartial("AptProfileFilter"); %>
    <%= Html.Telerik().Grid(Model.profiles)
        .Name("Profiles").DataBinding(dataBinding => dataBinding
             //Ajax binding
             .Ajax()
                   //The action method which will return JSON and its arguments
             .Update("_AjaxBinding", "AptProfile", new {id = (string)ViewData["BuildingID"]}))
                .Columns(columns =>
                                     {
                                         columns.Bound(p => p.AptProfileID).Width(100);
                                         columns.Bound(p => p.Apartment.Building.Complex.Name).Width(100);
                                         columns.Bound(p => p.Apartment.Building.BuildingID).Width(100);
                                         columns.Bound(p => p.Apartment.AptRate).Width(100);
                                     })
                .Pageable()
                .Sortable()

I have attached a screenshot of the output of firebug when I select a item in my dropdownlist.  As you can see in the screenshot the data collection from the grid model is being populated with the correct data. I am new to MVC. Thank you for any help on this.
Tags
Grid
Asked by
KooterB
Top achievements
Rank 1
Share this question
or