Filtering An UltraGrid

We figured it out. I had CustXPart for the table name, when it was CustXPrt. Sometimes the little things can be so frustrating!

--- In vantage@yahoogroups.com, "whitenight922" <whitenight922@...> wrote:
>
> I'm trying to filter the data in an ultragrid. The only thing that doesn't work in the code below is the where clause. Any ideas?
>
> Thanks! Dean.
>
>
> Private Sub txtPartNum_TextChanged(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles txtPartNum.TextChanged
> '// ** Place Event Handling Code Here **
> Dim edvPart As EpiDataView = CType(oTrans.EpiDataViews("Part"), EpiDataView)
> Dim strPart as String = edvPart.dataView(edvPart.Row)("PartNum")
> Dim CustPart As CustXPrtAdapter = New CustXPrtAdapter([PartForm])
> Dim strWhereClause as string
> CustPart.BOConnect()
> Dim MorePages as Boolean
> strWhereClause = "PartNum = '"& strPart & "'"
> Dim opts As SearchOptions = New SearchOptions(SearchMode.AutoSearch)
> opts.NamedSearch.WhereClauses.Add("CustXPart",strWhereClause)
> Dim CustPartList As Data.DataSet = CustPart.Getlist(opts,MorePages)
> ugdCustPart.DataSource = CustPartList
> End Sub
>
I'm trying to filter the data in an ultragrid. The only thing that doesn't work in the code below is the where clause. Any ideas?

Thanks! Dean.


Private Sub txtPartNum_TextChanged(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles txtPartNum.TextChanged
'// ** Place Event Handling Code Here **
Dim edvPart As EpiDataView = CType(oTrans.EpiDataViews("Part"), EpiDataView)
Dim strPart as String = edvPart.dataView(edvPart.Row)("PartNum")
Dim CustPart As CustXPrtAdapter = New CustXPrtAdapter([PartForm])
Dim strWhereClause as string
CustPart.BOConnect()
Dim MorePages as Boolean
strWhereClause = "PartNum = '"& strPart & "'"
Dim opts As SearchOptions = New SearchOptions(SearchMode.AutoSearch)
opts.NamedSearch.WhereClauses.Add("CustXPart",strWhereClause)
Dim CustPartList As Data.DataSet = CustPart.Getlist(opts,MorePages)
ugdCustPart.DataSource = CustPartList
End Sub