Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format
Message
De
18/02/2002 08:16:30
 
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Titre:
Re: Format
Divers
Thread ID:
00621322
Message ID:
00621493
Vues:
8
Paul,

This really depends on the type of formatting, but for complex formatting you can use template columns. This is what I've used to merge two fields together (first name + last name), call a function that returns a string as a data source for a column etc.

here is an example:
<asp:TemplateColumn HeaderText="Name">
 <ItemTemplate>
  <asp:Label id="Label1" text='<%# 
    DataBinder.Eval(Container.DataItem,"lastname") + _
    ", " + DataBinder.Eval(Container.DataItem,"firstName") %>' 
    Runat="server">
  </asp:Label>
 </ItemTemplate>
</asp:TemplateColumn>
there is an example on my website at www.lifeasbob.com/Code/datagrid.htm ,
hopefully that will help you out some.

Bob Horkay
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform