Autor Beitrag
Bergmann89
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1742
Erhaltene Danke: 72

Win7 x64, Ubuntu 11.10
Delphi 7 Personal, Lazarus/FPC 2.2.4, C, C++, C# (Visual Studio 2010), PHP, Java (Netbeans, Eclipse)
BeitragVerfasst: Di 04.05.10 02:07 
Hey,

ich bin grad dabei die Daten aus meiner SQL Datenbank irgendwie in ein DataGrid zu bringen. Aber irgendwie will das nich so wie ich will. Wenn ich den Code nehm, den ich HIER gefunden hab, dann stehn zwar Daten im Grid, aber meine Formatierung und alles was ich vorher in der ASPX definiert hatte is weg. Am Ende soll es dann in etwa so wie HIER aussehen.
So hab ich das DataGrid in der ASPX definiert:
ausblenden volle Höhe XML-Daten
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:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
<asp:DataGrid 
  ID="DG_AccountData" 
  runat="server" 
  BackColor="LightGoldenrodYellow" 
  BorderColor="Firebrick" 
  BorderWidth="1px" 
  CellPadding="1" 
  ForeColor="Black" 
  GridLines="None" 
  AllowSorting="True">
  <FooterStyle 
    BackColor="Tan" 
    Font-Bold="False" 
    Font-Italic="False" 
    Font-Overline="False" 
    Font-Strikeout="False" 
    Font-Underline="False" />
  <SelectedItemStyle 
    BackColor="DarkSlateBlue" 
    ForeColor="GhostWhite" />
  <PagerStyle 
    BackColor="PaleGoldenrod" 
    ForeColor="DarkSlateBlue" 
    HorizontalAlign="Center" />
  <AlternatingItemStyle 
    BackColor="PaleGoldenrod" />
  <HeaderStyle 
    BackColor="Firebrick" 
    Font-Bold="True" />
  <Columns>
    <asp:BoundColumn HeaderText="Login">
      <HeaderStyle Width="50px" />
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Name">
      <HeaderStyle Width="50px" />
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Stadt">
      <HeaderStyle Width="50px" />
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="PLZ">
      <HeaderStyle Width="50px" />
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Straße">
      <HeaderStyle Width="50px" />
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="Tel">
      <HeaderStyle Width="50px" />
    </asp:BoundColumn>
    <asp:BoundColumn HeaderText="eMail">
      <HeaderStyle Width="50px" />
    </asp:BoundColumn>
    <asp:EditCommandColumn 
      CancelText="Abbrechen" 
      EditText="Bearbeiten" 
      UpdateText="Aktualisieren">
    </asp:EditCommandColumn>
    <asp:ButtonColumn 
      CommandName="Delete" 
      Text="Löschen">
    </asp:ButtonColumn>
  </Columns>
</asp:DataGrid>

Den C#-Code hab ich mittlerweile wieder verworfen, denn der ging ja nich... Wäre echt toll, wenn mir da jmd helfen kann. Zumidest beim Ansatz.

MfG & Thx Bergmann.

_________________
Ich weiß nicht viel, lern aber dafür umso schneller^^