user2800704
user2800704

Reputation: 57

Janus Grid sumarize in row

I'm using Janus grid in C#, and I need to make a total sum by each row.

Column1 | Column2 | Total

       1          1         2

Thnx in advance.

Upvotes: 0

Views: 1970

Answers (1)

Arnold
Arnold

Reputation: 98

you try this:

private void Grd_Detail_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
{
    int i = 1;
    for (i = 0; i < Grd_Detail.RowCount; i++)
    {
            if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record)
            {           
                 int s1=Int32.Parse(Grd_Detail.GetRow(i).Cells["Column1"].Value.ToString());
                 int s2=Int32.Parse(Grd_Detail.GetRow(i).Cells["Column2"].Value.ToString());      
                 Grd_Detail.GetRow(i).Cells["Column3"].Value=s1+s2;
            }
        }
    }
}

Upvotes: 1

Related Questions