hiding key columns in datagrid.

  • Thread starter Thread starter Peter Rilling
  • Start date Start date
P

Peter Rilling

Okay, I know that the DataKeyField property of a DataGrid is supposed to
allow me to define a field which will not be displayed. The values in that
column end up in the DataKeys collection. My problem is that the column is
still being rendered. I even tried the sample in the MSDN library for the
DataKeyField and the column is showing. I though that this was supposed to
give me the ability to hide the key column. Is there anything else I need
to do besides setting DataKeyField?
 
thats weird and all but you can set the visiibility of the column,
just look in its properties. also, are you autogenerating the columns?
 
Hi,

What if you set the column width to 0?

That works in a web grid, no idea in a windows one though.



cheers,
 
Back
Top