/* This snippet modifies the data source of a ComboBox in a custom DataGrid Column Style (featuring a ComboBox). The keyword this references this Style.
Note that a DataView object comes by default (DefaultView) in the DataTable
object. This makes sorting on the fly possible with one line of code.
*/ DataRow dRow = p_dataTable.NewRow(); dRow[p_valueMember] = DBNull.Value; dRow[p_displayMember] = this.NullText; p_dataTable.Rows.Add(dRow); p_dataTable.DefaultView.Sort = p_displayMember;