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 1072779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:54:26+00:00 2026-05-16T20:54:26+00:00

I have a telerik grid, when I edit a row: but if i pressed

  • 0

I have a telerik grid,
alt text
when I edit a row:
alt text
but if i pressed the update button or even cancel(watch the mid column):
alt text

here is the declaration:

    <%= Html.Telerik().Grid<AlefTech.HumanResource.WebModule.ViewDto.MaritialStatusItemEditDto>(Model)
        .Name("Grid")
        .DataKeys(keys => { keys.Add(c => c.MaritialStatusItemID); keys.Add(k => k.Index); })
        .Columns(columns =>
        {
            //columns.Bound(m => m.MaritialStatusItemID).Visible(false);
            columns.Bound(m => m.Index).Title("").Sortable(false).Width(0);
            columns.Bound(m => m.Name);
            //columns.Bound(m => m.Brithdate).Width(130).Format("{0:d}");
            //columns.Bound(m => m.Gender);
            columns.Bound(m => m.MaritialStatusItemType);
            //columns.Bound(m => m.Notes);
            //columns.Bound(m => m.Status);
            //columns.Bound(m => m.CreationDate);
            //columns.Bound(m => m.ItemGuid);//.ClientTemplate("<input type='hidden' value='<#ItemGuid#>' name='ItemGuid' id='WorkerID'>");
            columns.Command(command => { command.Edit(); command.Delete(); });
        })
       //.ClientEvents(cfg => cfg.OnDataBound("onRowDataBound"))
        .ToolBar(t => t.Insert())
        .DataBinding(d => d.Ajax()
            .Select("MartialStatusGridSelect", "Worker")
            .Insert("MartialStatusGridInsert", "Worker")
            .Update("MartialStatusGridUpdate", "Worker")
            .Delete("MartialStatusGridDelete", "Worker"))
        .Scrollable()
       .Editable(editing => editing.Enabled(true))
        .Sortable()
        .HtmlAttributes(new { @class = "t-grid-rtl", @hegiht = "450px" })
        .Pageable()

%>

and the Model :

   public class MaritialStatusItem : BaseEntity
    {
        [StringLength(50)]
        [Required]
    public virtual string Name { get; set; }

        [UIHint("MaritialStatusEnum")]
        public virtual MilitaryStatusEnum MaritialStatusItemType { get; set; }
    }

the Display Template MaritialStatusEnum.ascx

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%=((MilitaryStatusEnum)Model == .MilitaryStatusEnum.Serving)? "Serving" : "Finished"
%>

the Editor Template

   <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AlefTech.HumanResource.Core.MartialStatusEnum>" %>
    <%=Html.DropDownList("MartialStatus", new SelectListItem[] { new SelectListItem { Text = "Serving", Value = "0" }, new SelectListItem { Text = "Finished", Value = "1" } }) %>

any Ideas why this happenning??

  • 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-16T20:54:27+00:00Added an answer on May 16, 2026 at 8:54 pm

    well, I solved the problem using the way mentioned in this topic
    as following :

    columns.Bound(m => m.MaritialStatusItemType).ClientTemplate("<#= maritialStatusItemEnum[MaritialStatusItemType] #>");
    .
    .
    .
    <script type="text/javascript">
    var maritialStatusItemEnum = ["Single person", "Married Person", "Divorced Person", "Widowed"];
    </script>
    

    and notice this is a solution for an Enum property, but if you have a complex object, you should consider another solution.

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

Sidebar

Related Questions

On my view i have multiple telerik MVC grid rendering. But i only have
I have telerik grid on my page. But it working not correctly. Problem: when
I have a SELECTABLE telerik grid with a checkbox column. When the checkbox is
i have bind the client template in my telerik grid but it does not
I have a very similar problem to the post located here: Telerik grid with
I have a Telerik MVC Grid where there is a column Names , Gender
I have a Telerik grid. For each row there is a details table. The
I have a footer with column totals on my Telerik MVC grid. I would
I need to have a Telerik MVC grid with a combobox (in edit mode)
I have a Telerik Grid, with two columns I need to keep second column

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.