Click here to Skip to main content
15,912,082 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have datatable it contains 3 rows and i want to query it so i have created a dataview

C#
DataView dv=new DataView(_dtrecomendationData);
 if (dv.RowFilter="Priority=2")
                    {
                        _dtrecomendationData.Rows[0][0] = "--";
                    }


But i am getting an error at dv.RowFilter="Priority=2" like cannot convert string to bool.
Posted
Updated 11-Jul-14 2:15am
v2

1 solution

C#
if (dv.RowFilter == "Priority=2")


there you go ;)
 
Share this answer
 
Comments
chandra sekhar 11-Jul-14 8:15am    
I have 3 rows in those two named Priority so how to filter between those two?

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