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. Image for the cookie policy date
close icon

Hidden Column in the grid

     I have couple of questions in the attached file.

Thanks for all your support.


Attachment: Couple_of_Questions_d77156bf.zip

1 Reply

SI Silambarasan I Syncfusion Team April 28, 2014 11:01 AM UTC

Hi Rajiv,

Thanks for using Syncfusion Products.

Query 1: “Is it possible to have a list of columns hidden with model”

We are glad to inform you that your requirement can be achieved by handling onLoad clientside event to set the column hidden. Please refer the following code snippet.


.ClientSideEvents(events =>{






function addToHiddenColumn(sender) {

var gridObj = $find("OrdersGrid");





Query 2: “Can we pass caption or hidden column value from the JavaScript?”

We can pass caption or hidden column values by using query string from script to controller. For passing multiple arguments, we use '&' to separate instead of using '?'. Please refer the below code snippet.



function SelectionHandler(sender, args) {

window.open("NewScreen?caption=" + sender.get_Caption() + "&hiddenColumn=" +args.colObj[5].HeaderText + "&value=" + args.record.ShippedDate);




public ActionResult NewScreen(string caption, string hiddenColumn, string value)


ViewBag.Caption = caption;

ViewBag.HiddenColumn = hiddenColumn;

ViewBag.Value = value;

return View();


For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.




Query 3: “When I use dataset.Tables[0].AsEnumerable() to get the model for the grid, in case of no data/result I get error while loading the grid. I want to be able to show no data returned in an empty grid.”

From this query, we have found that it is not feasible to bind the empty DataRow to the grid using DataTable. Because we need at least one DataRow to bind the column values into the grid otherwise we are not able to get the column values if the column is null. So empty DataRow binding is not possible in DataTable.

Query 4:One of our requirements is to have a link in the grid and be able to pass some values with it. How to achieve with the model we are using.”

Since this query already answered in the forum 116161, please follow-up the below link:


Please let us know if you need any further assistance.


Silambarasan I

Live Chat Icon For mobile
Up arrow icon