Results 1 to 7 of 7

Thread: Binding/Rebinding data to chart for asp.net 3.5

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    10

    Binding/Rebinding data to chart for asp.net 3.5

    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

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Binding/Rebinding data to chart for asp.net 3.5

    Post your code
    Please mark you thread resolved using the Thread Tools as shown

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    10

    Re: Binding/Rebinding data to chart for asp.net 3.5

    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

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Binding/Rebinding data to chart for asp.net 3.5

    Where do distinct between the checkboxes ?
    Please mark you thread resolved using the Thread Tools as shown

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2010
    Posts
    10

    Re: Binding/Rebinding data to chart for asp.net 3.5

    The string sQry is passed according to the selection of Radio Button

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Binding/Rebinding data to chart for asp.net 3.5

    Have you set a breakpoint in your code to verify that sQry is what you think it is each time?

    Gary

  7. #7
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Binding/Rebinding data to chart for asp.net 3.5

    Did you debug it ? Are you getting the valid data in the new ds ?
    Please mark you thread resolved using the Thread Tools as shown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width