Click here to Skip to main content
15,867,869 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello All,

I am trying to set an error on a datarow which I am filtering out from a datatable and showing that row with error on a grid.

What I have tried:

The below code is working fine for me -
C#
DataRow dr = ds.Tables[0].Rows[0];
//Working
dr.SetColumnError("Column1","This is an error");

But if I use DataSet.Select to filter the row and set error on it, the error is not appearing on the row.
C#
DataRow[] dr = ds.Tables[0].Select("Key = 1");
//Not Working
dr.SetColumnError("Column1","This is an error");

Somehow the error set on the column clears when I bind the dataset with the grid in the second case. Please help.

Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900