Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim tvPage1 As TreeView = CType(Session("treeview"), TreeView) Dim strConn As String = CType(Me.Master, MasterPage).connectString Dim objConn As New MySqlConnection(strConn) Dim objDS As New DataSet Dim ldDate As String = (CType(ddlDates.SelectedValue, Date).GetDateTimeFormats())(66) Dim strSql As String strSql = "SELECT action,totNumberActions,Status,totCountStatus,categoryname,createdate " & _ " FROM kpi_mrpactions " & _ " WHERE savedate = '" & ldDate & "'" & _ " ORDER BY action,status " Dim daMrp As New MySqlDataAdapter(strSql, objConn) daMrp.Fill(objDS, "dtMrp") GridView1.DataSource = objDS GridView1.DataBind() End SubThe data is coming from a MySql table.