Hi every one !

i am try to Bind Dropdownlist from Gridview .... what i am trying to do i fill my GridView from dataBase .. when i select a Row From Grid it Fill TextBoxes But show error in

"'cmbNature' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value"

I am using the follwing code:

Protected Sub Repeater1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Repeater1.SelectedIndexChanged
        txtSNo.Text = Repeater1.SelectedRow.Cells(1).Text
        txtNameTitle.Text = Repeater1.SelectedRow.Cells(2).Text
        cmbNature.SelectedValue = Repeater1.SelectedRow.Cells(3).Text
        cmbForum.SelectedValue = Repeater1.SelectedRow.Cells(4).ToString
        txtDate.Text = Repeater1.SelectedRow.Cells(5).Text
        txtProceedings.Text = Repeater1.SelectedRow.Cells(6).Text
        txtDesc.Text = Repeater1.SelectedRow.Cells(7).Text
    End Sub

Thanks in Advance

Where is the dropdown getting its list from? if it is databound, you may need to force the databinding to take place first on the postback (ie: before the above event)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.