Dear All,
I m using two radio buttons,
The binding of the data to chart switches according to the radio button selection, but it shows only the data that is selected for the first radio button
Regards
Suresh G
Printable View
Dear All,
I m using two radio buttons,
The binding of the data to chart switches according to the radio button selection, but it shows only the data that is selected for the first radio button
Regards
Suresh G
Post your code
Private Sub BindData(ByVal ChartName As Chart, ByVal sQry As String, ByVal sTableName As String)
Conn = New SqlConnection
Conn.ConnectionString = ConfigurationManager.ConnectionStrings("Conn").ConnectionString
Conn.Open()
DA = New SqlDataAdapter
sqlCmd.Connection = Conn
sqlCmd.CommandText = sQry
sqlCmd.CommandType = CommandType.Text
DA.SelectCommand = sqlCmd
If DS.Tables(sTableName) IsNot Nothing Then
DS.Tables.Remove(sTableName)
End If
DA.Fill(DS, sTableName)
ChartName.DataSource = DS.Tables(sTableName)
ChartName.DataBind()
End Sub
Where do distinct between the checkboxes ?
The string sQry is passed according to the selection of Radio Button
Have you set a breakpoint in your code to verify that sQry is what you think it is each time?
Gary
Did you debug it ? Are you getting the valid data in the new ds ?