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 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 problem with the Telerik grid that I can't seem to find
I have an MVC telerik grid that I have set up to do custom
I have problem, I have dropdownlist in mvc telerik grid every thing is ok
I have a Telerik RadGrid. The initial DataSource that is bound to the grid
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
I have a very similar problem to the post located here: Telerik grid with
I have a Html.Telerik().Grid() that is bound to a model in my MVC view.
I am doing a task related to telerik grid. In that I have added
I'm using Telerik's Grid control from the MVC Extensions. I have it set up

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.