I have a text box search bar in my WPF application that displays records in a datagrid if they match the textbox content. The DataGrid has 2 cells- The first is a string and the second is an Int. I would like to retrieve the int values from the second cell in every row by clicking a separate search button. I unfortunately cannot seem to figure out how to accomplish this.
string ID = (DataGrid.SelectedCells[1].Column.GetCellContent(0) as TextBlock).Text;