Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GridOrder: last input must be first in the grid
Message
De
28/03/2007 10:04:05
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows XP
Divers
Thread ID:
01209207
Message ID:
01209212
Vues:
21
>Hi All,
>
>I have a datagrid with a datatable as datasource. I'm inserting rows into the datatable with the InsertAt(dr,0) function, because I want the last record to be the first in the grid. But this doesn't work ! Can anyone help me ?
>
>Best Regards,
>Hans

Do you have some sort of auto-incrementing primary key in your datasource? If so, you can create a dataview, sort on that key DESC, and bind your datagrid to the dataview. I usually try to bind datagrids to dataviews anyway, because it saves time in the future when users inevitably want some sort of crazy sorting or filtering.
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform