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.
Unfortunately, activation email could not send to your email. Please try again.

Hidding a column in a grid asp.net mvc

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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");
gridobj.hideColumnByIndex(Number(1));
});

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.

Regards
Adrian


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

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.

hideColumnByIndex:

Please refer this code snippets:

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



hideColumn:

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.

Regards,
Eswari.S



CONFIRMATION

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.

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.

;