Hi this works for me
<<<<<<code>>>>>>>>>
Dim cnLogin As New SqlConnection(connectionstring)
Dim ds As New DataSet()
Dim dv As DataView
cnLogin.Open()
Dim da As New SqlDataAdapter("Select * from tr042", cnLogin)
da.Fill(ds)
dv = New DataView(ds.Tables(0))
dv.RowFilter = " col1 = true"
DataGrid1.DataSource = dv
cnLogin.Close()
cnLogin.Dispose()
<<<<<<<code>>>>>>>>
hth Peter
"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Yeah, I know.
But the field is there.
In my catch clause I set the datagrid to the datatable instead of to the
filtered dataview
-snip
Try
rsDW.RowFilter = sFilter
grdTableData.DataSource = rsDW
Catch err As Exception
Console.WriteLine(err.Message)
grdTableData.DataSource = dtTable
End Try
-snip
Regards
Kejpa
"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl... It looks like that error has nothing to do with your row filter because
what the error says is I can't find a column named col1 in the table called
test.
hth
Peter
"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi... Hi,
How do you write a Rowfilter for a boolean column?
col1=true
col1='true'
col1= 1
col1= -1
Will all render an exception:
Column 'col1' does not belong to table Test.
Any thoughts?
TIA
Kejpa