Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Help with Drop Down

$
0
0

I am having an issue with posting data back to a drop down based on a select from a gridview.  Below is my code:

'
        Dim row As GridViewRow = GridView1.SelectedRow
        Tid0Txt.Text = row.Cells(1).Text
        Receipt_DateTxt.Text = row.Cells(5).Text
        Receipt_NumberTxt.Text = row.Cells(6).Text
        Receipt_TypeTxt.Text = row.Cells(7).Text
        Receipt_AmountTxt.Text = row.Cells(8).Text
        Amt_Pd_DateTxt.Text = row.Cells(17).Text
        Amt_Pd_RefTxt.Text = row.Cells(18).Text
        Amount_PaidTxt.Text = row.Cells(19).Text


        If Receipt_TypeTxt.Text = "Cash" Then
            Receipt_TypeDrop.SelectedIndex = 1
        ElseIf Receipt_TypeTxt.Text = "Master Card" Then
            Receipt_TypeDrop.SelectedIndex = 2
        ElseIf Receipt_TypeTxt.Text = "Money Order" Then
            Receipt_TypeDrop.SelectedIndex = 3
        ElseIf Receipt_TypeTxt.Text = "Visa" Then
            Receipt_TypeDrop.SelectedIndex = 4
        End If
 I am having issues with posting the databack to my Receipt_TypeDrop. When I click the select, all the information except the Receipt type is poplulated.
No data gets selected.  I do have data in the row.cell(7).
 


 


Viewing all articles
Browse latest Browse all 3509

Trending Articles