SUM(custom columns)

Have 7 custom columns that I would like to do a SUM and display at the bottom as it is with standard columns

not sure how to go about this:ex column
$this->ListOptions->Add(“GSTonKM”);not sure what to do in
ListOptions_Rendered(){

		$item = &$this->ListOptions->getItem("GSTonKM"); 
		$GSTonKM = ($ttlKM * 0.06542);
		$item->Body = FormatCurrency($GSTonKM, 2);

    if ($this->RowType == ROWTYPE_AGGREGATE) {

??? not sure what to total and what to display ??
}
}

Since the values are not from database, you cannot use SUM(), you need to sum them yourself when you set the value by ListOptions_Rendered. You may use global variables to save the values.

thanks,
but how would I display the total on the aggregate row if possible ?.

NEW Column
2
35Total: 10

You may use Row_Rendered server event and check if $this->RowType == ROWTYPE_AGGREGATE.