Tag: DataGrid
-
Talk about ‘CanUserAddRows ‘ property of DataGrid in WPF
as far as we know the property ‘CanUserAddRows ‘ can be used in datagrid to give user limitation to add new rows or not. the detail about this property is described in https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.datagrid.canuseraddrows?view=windowsdesktop-8.0 if we set CanUserAddRows = false ,the user can not add new rows and input data , if we set true, it…
-
Two ways to have ComboBox as Column in DataGrid in WPF
Combobox will be used when DataGrid would like provide multi options(datatype is enum) to select in datagrid column. There is two way to implement (1) DataGridComboBoxColumn (2) DataGridTemplateColumn. In fact there are 4 basic dataGridColumn supported on DataGrid(1)DataGridComboBoxColumn – display enum data (2)DataGridHyperlinkColumn-display url data (3)DataGridCheckBoxColumn – display boolean data (4) DataGridTextColumn -display text data.…