The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ESEswari S Syncfusion Team 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.
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.