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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hidding a column in a grid asp.net mvc

Thread ID:





98601 Mar 10,2011 02:15 PM UTC Mar 15,2011 06:00 AM UTC ASP.NET Web Forms (Classic) 1
Tags: Tools
Adrian Sahlke
Asked On March 10, 2011 02:15 PM UTC

Hi, i have a problme with the grid in mvc.

I want to hide a column. I found in mvcsample how it works.

But i need it directly after a page was loaded.
if i try to do something like this:

$(document).ready(function HideColumnByIndex(Indexval) {
var gridobj = $find("Grid1");

i will get an null object. the findmethode doesn't find anything.
if i try $("#Grid1"); i will get an object but it doesn't have a hideColumnByIndex() function.

How i can Hide a column in a mvc grid on startup?

Thanks for answers. I need it cause i want to edit a row with a inlineedittemplate but i don't want to show the primarykey column.


Eswari S [Syncfusion]
Replied On March 15, 2011 06:00 AM UTC

Hi Adrian,

We have analyzed your query where the code you have given for hiding the column is fine. But it should be placed after the Script Manager() in Site. Master page.


Please refer this code snippets:

<%=Html.Syncfusion().ScriptManager() %>


We can also use “hideColumn” method to hide the columns. Here, the “OrderID” is the name of the Column to be hidden.

Please refer this code snippets:

<%=Html.Syncfusion().ScriptManager() %>

Note: We have already updated the same response for this query in the incident 78294.

Please let us know if you need further assistance.



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