search items inside datagridview
-
hi i need help in searching records in datagridview and was trying this for days still i couldn't do it... here is the details in a datagridview1 i have the following columns. Code | Description | Price | Qty | Total when user types a code number in the code Column...... description and price is automatically displayed, thanks cheers zafax
so much of happy ending...
-
hi i need help in searching records in datagridview and was trying this for days still i couldn't do it... here is the details in a datagridview1 i have the following columns. Code | Description | Price | Qty | Total when user types a code number in the code Column...... description and price is automatically displayed, thanks cheers zafax
so much of happy ending...
types a code ->select the database/dataset/datatable(This depends on your needs) to search you need->bind datagridview again.If you do not wish to refresh,you can use ajax.dll. i am chinese,english is not my first language.so i can't speak in detail.Hope I express clearly
-
types a code ->select the database/dataset/datatable(This depends on your needs) to search you need->bind datagridview again.If you do not wish to refresh,you can use ajax.dll. i am chinese,english is not my first language.so i can't speak in detail.Hope I express clearly
-
thanks for your reply. are you sure u did understand my message ? it could be grateful if you could help me in code style, im creating a windows application.
so much of happy ending...
when user types a code number in the code Column...... description and price is automatically displayed let me see.yes ,i do not understand the message . Two kinds of situations 1: add a new textbox to input the code ,when the textbox change,the information display in the datagridview.of course,you said you want search the datagridview,so the datagridview is be filled at firt.datagridview's datasource usuall is datatable . you can write the code like this
DataTable dt = ds.Table\[0\]; DataView dv = dt.DefaultView; dv.RowFilter = "ID = '"+textBox1.Text+"'"; // dataGridView1.DataSource = dv;
2:I am a real jerk.I don't understand what you mean.If this is true.i am very sorry,but you could laugh whit me at my poor english.
-
when user types a code number in the code Column...... description and price is automatically displayed let me see.yes ,i do not understand the message . Two kinds of situations 1: add a new textbox to input the code ,when the textbox change,the information display in the datagridview.of course,you said you want search the datagridview,so the datagridview is be filled at firt.datagridview's datasource usuall is datatable . you can write the code like this
DataTable dt = ds.Table\[0\]; DataView dv = dt.DefaultView; dv.RowFilter = "ID = '"+textBox1.Text+"'"; // dataGridView1.DataSource = dv;
2:I am a real jerk.I don't understand what you mean.If this is true.i am very sorry,but you could laugh whit me at my poor english.
hi bro. you really got my point and you did exactly what i asked for . thanks. But just one thing i needed is that i dont want a textbox. instead i want search data by using datagridview column which is the first column. thanks ...................:)
so much of happy ending...