TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Praveen Maurya
NA
146
26.9k
Search in Datagridview
May 3 2018 11:39 AM
I have a datagridview in my project and i have merged two table in that gridview using inner join sql query and now i want to search in that gridview
Code is like ..
public
void
Show_items()
{
con.Open();
SqlDataAdapter sda1 =
new
SqlDataAdapter(
"select ITEM.ITEM_NAME, STOCK.QTY, ITEM.SALEPRICE, ITEM.GST, ITEM.TOTALSALEPRICE from ITEM inner join STOCK on ITEM.ITEM_NAME = STOCK.ITEM_NAME "
, con);
DataTable dt1 =
new
DataTable();
sda1.Fill(dt1);
search_item_grid.Rows.Clear();
foreach (DataRow dr1 in dt1.Rows)
{
int
n = search_item_grid.Rows.Add();
search_item_grid.Rows[n].Cells[0].Value = dr1[0].ToString();
search_item_grid.Rows[n].Cells[1].Value = dr1[1].ToString();
search_item_grid.Rows[n].Cells[2].Value = dr1[2].ToString();
search_item_grid.Rows[n].Cells[3].Value = dr1[3].ToString();
search_item_grid.Rows[n].Cells[4].Value = dr1[4].ToString();
}
con.Close();
}
Reply
Answers (
5
)
Button to Open New Activity from fragment
multithreading in c-sharp dotnet