如何绑定国家和所有国家的asp.net下拉列表

时间:2014-07-11 04:33:56

标签: asp.net vb.net drop-down-menu combobox

在这种情况下数据绑定成功,但是当我点击所有商家名称时,它将绑定数据绑定到gridview

Sub MerchantDropDown()
      Dim ds As New DataSet
      ds = Utilities.spMerchantName1()
      ddlMerchantDropDownList.DataSource = ds
      ddlMerchantDropDownList.DataTextField = "MerchantName1"
      ddlMerchantDropDownList.DataValueField = "MerchantID"
      ddlMerchantDropDownList.DataBind()
      ddlMerchantDropDownList.Items.Insert(0, "All Merchant Names")
End Sub
Sub BindDataGrid()
      Try
        dsTran = Utilities.GetPointsBalanceDS(-999, IIf(txtEmbossLine.Text.Trim.Length = 0, "-999", txtEmbossLine.Text.Trim), IIf(txtEmbossName.Text.Trim.Length = 0, "-999", txtEmbossName.Text.Trim), IIf(ddlMerchantDropDownList.SelectedItem.Text.Trim.Length = 0, "-999", ddlMerchantDropDownList.SelectedItem.Text.Trim))

            sRecCount = dsTran.Tables(0).Rows.Count
            grdTransactions.DataSource = dsTran
            grdTransactions.DataBind()

        Catch ex As Exception
            Throw ex
        End Try
    End Sub

0 个答案:

没有答案
相关问题