WPF DataGrid Control:insert New Row
WPF : i have a grid which is bind from a List i want Insert a row before selected row. i can do this via insert a new blank record into a List ad rebind my grid but problem is my grid not persist after this like some cell are disable before insert the new row but after inse开发者_StackOverflow中文版rt the new row(rebind) all those cells are enable again.
Use an ObservableCollection
, this allows you to add items in a non-disruptive manner since you do not need to rebind the grid at all.
精彩评论