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
close icon

Field Visible while editing


Hi,
I have a column which is set visible = false, but in dialog edit mode the column is visible.

Can you please resolve?

.Column(column =>{column.Add(p => p.Id).Visible(false).AllowEditing(false);........

Thanks
Balu Chand


6 Replies

ES Eswari S Syncfusion Team October 19, 2011 10:04 AM UTC

Hi Balu,

Thank you for using Syncfusion products.

Query #1 : Field Visible while editing

Step #1 :AllowEditing property is used to make the editing false for particular field. Please refer to the following code snippets:


@{ Html.Syncfusion().Grid('SampleGrid')
. . .
.Column(col =>
{
. . .

col.Add(P => P.CustomerID).AllowEditing(false).HeaderText('Customer ID'); // set AllowEditing as false

. . .
})
}

Step #2 : If you want to hide the particular field from editing, then we can achieve the requirement in OnActionSucess event.

Sample code :



For your convenience, we have prepared the sample and the same can be downloaded from the following link :

Sample1247294632.zip

Also ,we can define the template columns for grid editing with DilogTemplate edit. Please refer to the following online UG :

http://help.syncfusion.com/ug_93/User%20Interface/ASP.NET%20MVC/Grid/default.htm?turl=Documents%2F5773editmodeconfiguration.htm

Please find the DialogTemplateEdit sample from the following link :

DialogTemplateEditing-198702443.zip


Please try this and let us know if you need any further assistance.

Regards,
Eswari.S






JB Jeremy Branham September 1, 2013 04:59 PM UTC

Writing hardcoded javascript functions is not a great way to handle something like this.
 
The grid rendering should support MVC data annotation attributes to show/hide columns.
 
The IMetadataAware interface should be considered.
 
 


BM Bala Murugan A.S Syncfusion Team September 4, 2013 12:37 PM UTC

Hi Balu,

 

Thanks for your update.

 

We are sorry for the inconvenience caused.

 

Currently we don't have full support of grid with mvc data annotation and This will be implemented in our upcoming feature releases.  We have logged your requirement as a feature request in our database and this will be implemented in our upcoming feature volume releases. It can be tracked through our Features Management System:

 

http://www.syncfusion.com/support/directtrac/features/MVC-1584

 

Please let us know if you have any concerns.

 

Regards,

Bala Murugan A.S



JB Jeremy Branham September 14, 2013 08:24 PM UTC

Thanks.


JB Jeremy Branham September 15, 2013 11:10 PM UTC

I don't see the feature request. Could the number be wrong?


ES Eswari S Syncfusion Team September 17, 2013 11:22 AM UTC

Hi Jeremy,

 

Sorry about the inconvenience caused.

 

The feature request can be viewed only if you are a licensed user. Please create the new incident in DirectTrac for better follow up with the features.

 

Please let us know if you have any queries.

 

Regards,

Eswari S


Loader.
Live Chat Icon For mobile
Up arrow icon