Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have joined two tables using left join and displayed it in a gridview. Now I want to search a particular row in that view according to the column 'Name'.

What I have tried:

I did the query for joining the two tables in sql:
SQL
SELECT HM.DELETED,HM.ISACTIVE,HM.ID AS ID, HM.NAME as NAME,HM.MOBILE AS MOBILE,HM.EMAIL AS EMAIL,HM.WEBSITE AS WEBSITE,STM.STATE_NAME AS STMSTATE FROM HOSPITAL_MASTER AS HM LEFT JOIN STATE_MASTER AS STM ON STM.ID=HM.STATE_ID WHERE HM.DELETED=0 and HM.ISACTIVE=1 ORDER BY NAME
and in code behind, for searching the particular row in that view i did the following in page load
Search1.StrQry = "select * from HOME_NURSE_REGISTRATION ";
Posted
Updated 15-May-17 7:22am
v2

1 solution

When you use a DataSet, you can use .RowFilter, see: Dataset table filtering: How to filter for rows where column "contains" a value.[^]
 
Share this answer
 

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