Retour de chariot dans un string
Bonjour,
je ne comprend pas pourquoi lorsque j'effectue un retour de chariot dans un string, rien ne se passe.
Je construis un string avec des éléments spécifiques qui proviennent de la base de données. Cependant je me dois de les séparer par un retour de chariot.
Code:
1 2
|
hebdomadaire = hebdomadaire + rw[3].ToString() + " " + rw[4].ToString() + " " + rw[5].ToString()+ " " + rw[6].ToString() + "\r\n"; |
Pour ensuite mettre ce string dans un datatable pour que cette dernière soit "binder" à mon grid
Code:
1 2 3 4 5 6 7
|
DataRow dr = dt.NewRow();
dr["hebdomadaire"] = hebdomadaire;
dr["PictureURL"] = pictureURL;
dr["total"] = total;
dr["nom"] = nom;
dt.Rows.Add(dr); |
Cependant dans mon grid, le string s'affiche uniquement sur une ligne.
Voici le code aspx de mon grid
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
<asp:GridView ID="GridView1" Runat="server" AutoGenerateColumns="False"
BorderWidth="1px" BackColor="White" CellPadding="3" BorderStyle="None"
BorderColor="#CCCCCC" Font-Names="Arial">
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<PagerStyle ForeColor="#000066" HorizontalAlign="Left"
BackColor="White"></PagerStyle>
<HeaderStyle ForeColor="White" Font-Bold="True"
BackColor="#006699"></HeaderStyle>
<Columns>
<asp:ImageField HeaderStyle-HorizontalAlign="Left" HeaderText="Participant" DataImageUrlField="PictureURL" AlternateText="go"></asp:ImageField>
<asp:BoundField DataField="nom">
<ItemStyle HorizontalAlign="Left"
VerticalAlign="Middle"></ItemStyle></asp:BoundField>
<asp:BoundField HeaderText="Total cummulatif" DataField="total">
<ItemStyle HorizontalAlign="Center"
VerticalAlign="Middle"></ItemStyle>
</asp:BoundField>
<asp:BoundField HeaderText="Choix hebdomadaire" DataField="hebdomadaire"></asp:BoundField>
</Columns>
<SelectedRowStyle ForeColor="White" Font-Bold="True"
BackColor="#669999"></SelectedRowStyle>
<RowStyle ForeColor="#000066"></RowStyle>
</asp:GridView> |
Bref, voici l'intégralité de mon problème, je ne comprend pas pourquoi je ne peux pas effectuer un retour de chariot.
Merci et bonne fin de journée
Gabriel Deschênes