We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

EditMode exclude Primarykey to be posted as 0?

Thread ID:





141959 Jan 13,2019 03:23 AM UTC Jan 14,2019 11:17 AM UTC ASP.NET MVC - EJ 2 1
Tags: Grid
Asked On January 13, 2019 03:23 AM UTC

when i use editmode asDialog, it display Id which is PK in the dialog and when i save it, it will post as 0. this cause modalstate.IsValid=false. is there anyway to omit this field or fix it somehow?
public partial class FeedBack
public int id { get; set; }
.Datasource(dataSource => dataSource.Json((IEnumerable
.FilterSettings(filter => { filter.FilterType(FilterType.Excel); })
.EditSettings(edit => { edit.AllowAdding().AllowDeleting()
.AllowEditing().ShowDeleteConfirmDialog().EditMode(EditMode.Dialog); })
.ToolbarSettings(toolbar =>
toolbar.ShowToolbar().ToolbarItems(items =>
}).CustomToolbarItems(new List<object>() { new Syncfusion.JavaScript.Models.CustomToolbarItem() { TemplateID = "#Details" } });
}).ClientSideEvents(eve => eve.Create("create").ToolbarClick("ToolBarClick"))
.Columns(col =>

Logesh Rajappa [Syncfusion]
Replied On January 14, 2019 11:17 AM UTC

Hi Emil, 

Greetings from Syncfusion. 

Query :  when i use editmode as Dialog, it display Id which is PK in the dialog 
From your query we suspect that you would like to hide a ‘id’ column when editing a grid row using dialog editing. Please refer to the below documentation to achieve your requirement, 
If we have misunderstood your query, then please get back to us with more information about the query in detail. 
Logesh Rajappa 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon