TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Test
NA
58
50.9k
Unable to hide the datagrid columns using jquery
Aug 17 2019 3:03 AM
Below is my grid binding logic in this grid I need to hide Department column conditionally that means if(admin == true) I need to show this column or else I need to hide this column how can I do this
var Form = $("#Form1");
$("#Grid_1", Form).html("Loading....");
$("#Grid_1", Form).DataGrid({
DataUrl: baseApiURL + '/Controller/GetDetails',
PostData: { SP_VA_AUTH_NO: AuthNo }, GridId: "GridDetails", Loader: false, PageSize: 10,
Columns: [
{ HeadStyle: "width:55px;", Title: "Id", ItemKey: "Id", ItemNull: "N/A" },
{ HeadStyle: "width:80px;", Title: "Name", ItemKey: "Name", ItemNull: "N/A" },
{ HeadStyle: "width:200px;", Title: "Salary", ItemKey: "Salary", ItemNull: "N/A" },
{ HeadStyle: "width:75px;", Title: "Department", ItemKey: "Department", ItemNull: "N/A" }
]
});
Reply
Answers (
4
)
Session in web api
How to set dynamic field in kendo grid?