Linq query of search option
please provide linq query of searching .
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mukesh Kumar TiwariRank #1,774 · 844 reputationPosted Feb 19, 2014, 8:10 PM EST
{
Fill_Grid();
}
=========================================
public void Fill_Grid()
{
var grid_data = from area in linq.Chk_Area_Masters
where area.Isdelete == 0 && area.Area_name.Contains(txt_search.Text)
select new
{
Area_Id = area.Area_id,
Area_Name=area.Area_name,
Enter_By=area.Created_by,
Enter_Date=area.Created_Date,
Update_By=area.Updated_by,
Update_date=area.Updated_Date,
};
if (grid_data.Count() > 0)
{
dataGridView1.DataSource = grid_data;
}
}
==============================================================
You can Make also Simple query like below..
var search_Data=from area in linq.Chk_Area_Masters
where area.Area_name.Contains(txt_search.Text)
select area;
Data_Grtid=search_data;