Search code examples
c#datagridviewautogeneratecolumn

C# Datagridview - Turn off AutoGenerateColumns when binding to XML file?


I am binding an XML file to a DataGridView. I don't want the columns to be auto-generated, in fact I want to generate them myself. Is there a way of turning off the auto generating columns feature and be able to programmatically create the columns myself?


Solution

  • Datagridview1.AutoGenerateColumns=false