我想顯示從我的gridview的4列到標籤的最後值,我不使用頁腳。我該怎麼做? 這是我的代碼,但它沒有奏效。顯示gridview的最後一個值
strcomm = "select DibayarPada, JumlahDiBayar, DibayarSebelum, JumlahBayaran from
bil where NoIC='" + Session("icvalue") + "'"
comm = New SqlCommand(strcomm, conn)
dr = comm.ExecuteReader
dt2.Load(dr)
GridView5.DataSource = dt2
GridView5.DataBind()
dateakhirtxt.Text = ds.Tables(0).Rows(ds.Tables(0).Rows.Count - 1)(0).ToString()
dateakhirtxt.Text = ds.Tables(0).Rows(ds.Tables(0).Rows.Count - 1)(0).ToString()
totalakhirtxt.Text = ds.Tables(0).Rows(ds.Tables(0).Rows.Count - 1)(0).ToString()
tarikhtxt.Text = ds.Tables(0).Rows(ds.Tables(0).Rows.Count - 1)(0).ToString()
jumlahtxt.Text = ds.Tables(0).Rows(ds.Tables(0).Rows.Count - 1)(0).ToString()
我真的不知道該怎麼做。
哪部分休息? – Avijit
@Avijit位於rows.count -1部分 –
您遇到的錯誤是什麼? – Avijit