C
Carlos
I need to add the total of each column at the end of the grdi How can I do
that, here is my actual code to retreive the data.
Dim SelectString As String
'//Convert date from string to Date
Dim L_Year As String
Dim L_Site As String
Dim L_Month As String
L_Site = Str(Val(Request.QueryString("TSiteNumber")) + 1)
L_Month = Request.QueryString("TMonths")
L_Year = Request.QueryString("TYear")
SelectString = "SELECT TSteID, TMine, TDate, TTime, TGrade, TSignal FROM
Grade WHERE (YEAR(Tdate)=" + L_Year + ")" + " AND (MONTH(TDATE)=" + L_Month
+ ")" + " AND TSteID=" + L_Site + " ORDER BY TMine"
'***************
SqlLbl.Text = SelectString
Dim mycnn As SqlConnection
mycnn = New SqlConnection("user id=nsclinet; password=swa ;Initial
Catalog=nstrack; Data Source=Carbon")
Dim mycmd As SqlDataAdapter
mycmd = New SqlDataAdapter(SelectString, mycnn)
'// Create and fill a DataSet.
Dim ds As DataSet
ds = New DataSet
mycmd.Fill(ds)
Dim Mysource As DataView
Mysource = New DataView(ds.Tables(0))
DataGrid1.DataSource = Mysource
DataGrid1.DataBind()
now How do I add the total of each column adding a new row ?
Thanks
that, here is my actual code to retreive the data.
Dim SelectString As String
'//Convert date from string to Date
Dim L_Year As String
Dim L_Site As String
Dim L_Month As String
L_Site = Str(Val(Request.QueryString("TSiteNumber")) + 1)
L_Month = Request.QueryString("TMonths")
L_Year = Request.QueryString("TYear")
SelectString = "SELECT TSteID, TMine, TDate, TTime, TGrade, TSignal FROM
Grade WHERE (YEAR(Tdate)=" + L_Year + ")" + " AND (MONTH(TDATE)=" + L_Month
+ ")" + " AND TSteID=" + L_Site + " ORDER BY TMine"
'***************
SqlLbl.Text = SelectString
Dim mycnn As SqlConnection
mycnn = New SqlConnection("user id=nsclinet; password=swa ;Initial
Catalog=nstrack; Data Source=Carbon")
Dim mycmd As SqlDataAdapter
mycmd = New SqlDataAdapter(SelectString, mycnn)
'// Create and fill a DataSet.
Dim ds As DataSet
ds = New DataSet
mycmd.Fill(ds)
Dim Mysource As DataView
Mysource = New DataView(ds.Tables(0))
DataGrid1.DataSource = Mysource
DataGrid1.DataBind()
now How do I add the total of each column adding a new row ?
Thanks