3
Contributors
4
Replies
20
Views
6 Years
Discussion Span
Last Post by rhiyan.tale
0

>What I need is to filter contents in 'run-time'.

set new data source.

Me.yourTableAdapter.Fill(Me.DataSet1.yourTable)
 Me.DataSet1.yourTable.DefaultView.RowFilter = "column_name='data'"
 yourBindingSource.DataSource = Me.DataSet1.yourTable.DefaultView
 Me.ReportViewer1.RefreshReport()
0

Hey sir I've tried your codes. Thanks!:)

Me.table1_1TableAdapter.Fill(Me.binfo_ds.table1_1)
Me.binfo_ds.table1_1.DefaultView.RowFilter = "FacultyID='123'"   
table1_1BindingSource.DataSource = Me.binfo_ds.table1_1.DefaultView
Me.ReportViewer1.RefreshReport()

I was just wondering if there's a way of getting the value
from a TextBox such as:

"FacultyID=TextBox1.Text"

instead of

"FacultyID='123'"

0

@adatapost
I think i have figured it out. Thanks for your help! :)

Me.table1_1TableAdapter.Fill(Me.binfo_ds.table1_1)
Me.binfo_ds.table1_1.DefaultView.RowFilter = "FacultyID = '" & TextBox1.Text & "'"
table1_1BindingSource.DataSource = Me.binfo_ds.table1_1.DefaultView
Me.ReportViewer1.RefreshReport()

Edited by eiallen: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.