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

  • Home
  • SEARCH
  • 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 4081812
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:06:32+00:00 2026-05-20T18:06:32+00:00

I have a telerik grid that shows a drop-down when editing. The problem is,

  • 0

I have a telerik grid that shows a drop-down when editing. The problem is, that I can’t set the selected value on the drop-down – it says null Reference. Here is the code:

Controller

 public ActionResult MultipleGm(long Id)
    {
      LoadGmData(Id);
      List<gm_select> LoadedGm = GmFunctions.GetGms(Id);
      return View("Gm/MultipleGm", LoadedGm);
    }
    public void LoadGameData(long Id)
    {
      ViewBag.Tms = GmFunctions.GetTms(Id);
     }

Model

public partial class gm_select
{
    [UIHint("NameID")]
    public name_id { get; set; }
}
public partial class name_id 
{
    public long id;
    public string name;
}

View

@model List<gm_select>
@(Html.Telerik().Grid(Model)
        .Name("Names")
        .Columns(columns =>
        {
            columns.Bound(o => o.name_id);
         })

DisplayTemplate

@model name_id
@Model.name

EditorTemplate

@model name_id
@(Html.Telerik().DropDownList()
     .Name("DropDownList")
     .BindTo(new SelectList((IEnumerable) ViewBag.Teams,"id","name", Model.name))
  )

The problem is here in the code Model.name, I don’t know way this is null. If I change the code to

@model name_id
@(Html.Telerik().DropDownList()
     .Name("DropDownList")
     .BindTo(new SelectList((IEnumerable) ViewBag.Tms,"id","name"))
  )

It works, but when editing it doesn’t show the correct selected item.

Any help is welcome, 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-20T18:06:32+00:00Added an answer on May 20, 2026 at 6:06 pm

    You can check the following online examples which show a similar setup:

    1. http://demos.telerik.com/aspnet-mvc/grid/serveredittemplates
    2. http://demos.telerik.com/aspnet-mvc/grid/clientedittemplates

    If they don’t help consider opening a forum thread in the Telerik forums and sending a short sample application.

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

Sidebar

Related Questions

I have a grid that is currently using Telerik Grids, I would like to
I have a partial view that uses a Telerik MVC Grid, and it has
I have a Telerik grid in my asp.net mvc application that looks something like:
I currently have a Telerik MVC Grid that is populated with Patients. What I
We have a Telerik Grid (i.e. enhanced version of ASP.Net vanilla grid). On some
I have a grid that binds a number of child data objects to columns
I have a problem with a telerik RadGrid where the paging section is not
Looking at: http://demos.telerik.com/aspnet-mvc/Grid?theme=vista Can anyone tell me what _FirstLook() is meant to return? It
I have a telerik grid, when I edit a row: but if i pressed
I have a RadComboBox that i have bound like shown below <telerik1:RadComboBox Grid.Row=2 Grid.Column=1

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.