View Single Post
  #1 (permalink)  
Old January 11th, 2007, 03:53 PM
bufanator bufanator is offline
Authorized User
Points: 54, Level: 1
Points: 54, Level: 1 Points: 54, Level: 1 Points: 54, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: west monroe, la, USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Refer to a cell with a DataView

Way system is setup:
I have a search option that filters through my datagrid into a dataview. (code below)
Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged
        If txtSearch.TextLength = 1 Then
            dvDetail.RowFilter = "substring(OrderNum,1,1) = '" & txtSearch.Text & "'"
            btnUpdate.Enabled = False
            cmbOrdStat.Enabled = False
        ElseIf txtSearch.TextLength = 1 Then
            dvDetail.RowFilter = "substring(OrderNum,1,2) = '" & txtSearch.Text & "'"
            btnUpdate.Enabled = False
            cmbOrdStat.Enabled = False
        ElseIf txtSearch.TextLength = 3 Then
            dvDetail.RowFilter = "substring(OrderNum,1,3) = '" & txtSearch.Text & "'"
            btnUpdate.Enabled = False
            cmbOrdStat.Enabled = False
        ElseIf txtSearch.TextLength = 4 Then
            dvDetail.RowFilter = "substring(OrderNum,1,4) = '" & txtSearch.Text & "'"
            btnUpdate.Enabled = False
            cmbOrdStat.Enabled = False
        ElseIf txtSearch.TextLength = 5 Then
            dvDetail.RowFilter = "substring(OrderNum,1,5) = '" & txtSearch.Text & "'"
            btnUpdate.Enabled = False
            cmbOrdStat.Enabled = False
        ElseIf txtSearch.TextLength = 6 Then
            dvDetail.RowFilter = "substring(OrderNum,1,6) = '" & txtSearch.Text & "'"
            btnUpdate.Enabled = False
            cmbOrdStat.Enabled = False
        ElseIf txtSearch.TextLength = 7 Then
            dvDetail.RowFilter = "substring(OrderNum,1,7) = '" & txtSearch.Text & "'"
            btnUpdate.Enabled = True
            cmbOrdStat.Enabled = True
            cmbOrdStat.Focus()
            cmbPop()
        End If
    End Sub

My problem is once it is in the dataview I can figure out how to refer to a specific cell with in the dv.

For instance my colums are:
Ordernum, orderstatus, statusdesc,billtoname, shipdate

What I need to do is call the filtered value in column two (orderstatus)...any ideas?

**Please forgive me if I am not expressing my questions clearly...I am a new graduate and still learning.**

Thank you,
John Williams
__________________
Thank you,
John Williams
Reply With Quote