Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGrid with totals
Message
De
04/03/2013 08:27:25
 
 
À
04/03/2013 03:26:43
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Divers
Thread ID:
01567310
Message ID:
01567356
Vues:
28
>>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform