I have a datagrid view in my WPF Form.

I want to highlight the Row duplicates based on the LicenseName.
I bind a datatable to my Gridview as follows.
- public DataTable table = new DataTable();
- private void showdetailsbtn_Click(object sender, RoutedEventArgs e)
- {
- table.Columns.Add("Subcategoryname", typeof(string));
- table.Columns.Add("Totallicense", typeof(int));
- table.Columns.Add("Inuse", typeof(int));
- // Here we add five DataRows.
- table.Rows.Add("Indocin", 10,10);
- table.Rows.Add("Indocin", 20, 10);
- table.Rows.Add("Hydralazine", 5,4);
- table.Rows.Add("Combivent", 11,2);
- table.Rows.Add("Dilantin", 6,3);
- licensegridview.DataContext = table;
- }
Vishwash Roy86 reputationPosted Sep 13, 2017, 1:55 AM EDT
Nilesh ShahRank #42 · 34.2K reputationPosted Aug 31, 2017, 5:10 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts