public void kraGridView_RowDataBound(object sender, GridViewRowEventArgs e)
int totalPercent = 0;
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblWeigh = (Label)e.Row.FindControl("lblWeigh");
// totalPercent += Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "lblWeigh"));
int total = int.Parse(lblWeigh.Text);
totalPercent += total;
}
else if (e.Row.RowType == DataControlRowType.Footer)
{
Label lblTotalPercentage = (Label)e.Row.FindControl("lblTotalPercentage");
// e.Row.Cells[5].Text = totalPercent.ToString();
lblTotalPercentage.Text = totalPercent.ToString();
}
}
japhta 0 Newbie Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
japhta 0 Newbie Poster
japhta 0 Newbie Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
japhta 0 Newbie Poster
japhta 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.