在这种情况下数据绑定成功,但是当我点击所有商家名称时,它将绑定数据绑定到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