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));
-
- 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;
- }
Please help me to solve my problem .