Seems I cant figure out anything on my own. Anyway, looking to set a total for a column in the footer. I see examples for the UltraWebGrid but nothing for the WebDataGrid. Thanks.
Yes, there is a Footer subobject off the BoundDataField, which has a Text property:
Thanks, for anyone's reference, I used the following example:
WebDataGrid1.Columns("ColName").Footer.Text = TotalSum.ToString
If it helps anybody, I used the prior post and .NET's DataTable.Compute to get nice totals. I had to set the CssClass for the footer as well, using !important in a few spots to override the Appletini theme I'm using (code is C#):
gridLease.FooterCaptionCssClass = "gridFooter"; gridLease.Columns["CurrentBalance"].Footer.Text = String.Format("{0:C}", Convert.ToDecimal(table.Compute("Sum([Current Balance])", ""))); gridLease.Columns["FutureActivity"].Footer.Text = String.Format("{0:C}", Convert.ToDecimal(table.Compute("Sum([Future Activity])", ""))); gridLease.Columns["ItemsOutstanding"].Footer.Text = "<p style=\"text-align: center\">" + table.Compute("Sum([ItemsOutstanding])", "").ToString() + "</p>";
Note the hack-y way that I set the text of one column to contain a paragraph with inline center style and override the right-align for one column.
Cheers,
John
Nice hack on the formatting.
Only problem I run into is that I update the footer using the _footerElement.innerText property and therefore loses the text-align property after update. Anyone know which property I need to change to keep the formatting?
Was there ever an update that allowed you to set the footer text client-side?