in your datagrid, subscribe for the AutoGeneratingColumn
event, the event args
(DataGridAutoGeneratingColumnEventArgs
) has the column name and a "Cancel
", if the column name is ID then set Cancel = true
. should do the trick.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…