Loop Through Datagrid In WPF (ItemSource Is Type Observable Collection)
Hello,
Assuming the databinding source of WPF Datagrid is of type ObservableCollection, the code below will loop through the WPF DataGrid.
Assuming the databinding source of WPF Datagrid is of type ObservableCollection, the code below will loop through the WPF DataGrid.
var row = GetDataGridRows(dgScripts); foreach (DataGridRow r in row) { CScriptsInfo info = (CScriptsInfo)r.Item; if(info.prog_name.ToString().Contains(txtScriptName.Text.Trim().ToUpper())) { r.IsSelected = true; } }
Comments
Post a Comment