>>>>Hi,
>>>>
>>>>in XAML is there a way to add a row of totals to the bottom of a datagrid?
>>>>
>>>>For example I want something like this:
>>>>
>>>>
Invoice # Invoice Amount
>>>>1234 100.00
>>>>1235 150.00
>>>>2 250.00
>>>>
>>>>where 2 is the count of invoices and 250.00 is the total of the Invoice Amount column.
>>>Is it feasible to add a total row to the data table?
>>
>>The problem I see with that is how to handle the sorting when a user re-orders the grid by clicking on the header.
>
>Hmm. Resizing and re-ordering of columns would work automatically. The difficulties would be in making sure the 'total's row was always the last regardless of sort order, not persisting it to the DB etc....
Yes, Viv
It's a kludge, but I've done it (blush)
I'm not familiar with the DataGrid, but the DataGridView has a property that prevents the user from change the sequence of the grid
Persisting to the DB should not be an issue if the datatable has been created only for display in the grid.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.