// show question as it should to be private void QuestionShowButton_Click(object sender, RoutedEventArgs e) { DataRowView drv = (DataRowView)DataGridQuestions.SelectedItem; if (drv != null) { //DataRowView drv = row.Item as DataRowView; string s = proxy.DrawQuestionById(Convert.ToInt32(drv["id"])); //MessageBox.Show(s); WindowQuestionView winQ = new WindowQuestionView(s); winQ.Show(); //this.Close(); } }