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" }
]
});

Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 16, 2019, 11:50 PM EDT
Test47 reputationPosted Aug 17, 2019, 12:02 AM EDT
Amit MohantyRank #112 · 20K reputationPosted Aug 18, 2019, 10:22 PM EDT
Ravishankar NRank #241 · 10.2K reputationPosted Sep 17, 2019, 7:33 PM EDT