Column of last row
I NEED TO BIND A VALUE OF PARTICULAR COLUMN OF THE LAST ROW TO LABEL IN C#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pulak debPosted Oct 31, 2014, 9:06 AM
MySqlDataAdapter da = new MySqlDataAdapter(cmd.CommandText, con);
da.Fill(dt);
if (dt.Rows.Count >= 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
RahulPosted Oct 31, 2014, 4:54 AM
Get the row count and then get the last row and as particular column as shown in above code snippet.