Gridview making a column invisable
Posted
by flyersun
on Stack Overflow
See other posts from Stack Overflow
or by flyersun
Published on 2010-06-17T14:33:47Z
Indexed on
2010/06/17
14:43 UTC
Read the original article
Hit count: 199
Hi I have a grid view which is dynamically generated via C# using a DataSet. I'm passing a row ID field (from the database) to the grid view, as this is required when a user clicks to edit a records. However I don't want the user to be able to view the column. I have tried the following but it doesn’t seem to work? Could anyone suggest a way to hide the column or a better way of attaching the information to the grid view row so it can be used at a later stage. c#
DataColumn ColImplantCustomerDetailsID = new DataColumn();
ColImplantCustomerDetailsID.ColumnName = "Implant ID";
ColImplantCustomerDetailsID.DataType = typeof(int);
ColImplantCustomerDetailsID.Visable = false; <-- visable doens't work here.
asp.net
© Stack Overflow or respective owner