Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[ASP.NET C#]: GridView Zeilen färben

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe folgendes GridView verwendet:

<asp:GridView ID="tbl_ViewConcernsAll" runat="server" 

    AutoGenerateColumns="False" AllowPaging="True" DataSourceID="GetConcernsAll" 

    PageSize="20" AllowSorting="True">

    <Columns>

        <asp:BoundField HeaderText="ConcernID" DataField="ConcernID" Visible="false" />

        <asp:HyperLinkField DataNavigateUrlFields="ConcernID" DataNavigateUrlFormatString="~/DesktopDefault.aspx?content=ViewConcern&ConcernID={0}"

            DataTextField="ConcernNr" HeaderText="Concern Nr." SortExpression="ConcernNr"

            Text="Concern Nr." >

            <ControlStyle ForeColor="Black" />

        </asp:HyperLinkField>

        <asp:BoundField HeaderText="Laufende Nr." DataField="LaufendeNr" SortExpression="LaufendeNr" />

        <asp:BoundField HeaderText="Concern Typ" DataField="Typ" SortExpression="Typ" />

        <asp:BoundField HeaderText="Projekt" DataField="Bezeichnung" SortExpression="Bezeichnung" />

        <asp:BoundField HeaderText="Eingangsdatum" DataField="Eingangsdatum" DataFormatString="{0:dd.MM.yyyy}" HtmlEncode="False" SortExpression="Eingangsdatum" />

        <asp:BoundField HeaderText="Abgabedatum" DataField="Abgabedatum" DataFormatString="{0:dd.MM.yyyy}" HtmlEncode="False" NullDisplayText="-" SortExpression="Abgabedatum" />

        <asp:BoundField HeaderText="Zieldatum" DataField="Zieldatum" DataFormatString="{0:dd.MM.yyyy}" HtmlEncode="False" SortExpression="Zieldatum" />

    </Columns>

    <HeaderStyle ForeColor="Black" />

</asp:GridView>

Ich möchte nun jede Zeile auf Ihre Daten überprüfen und diese Zeile dann entsprechend einfärben.

Frage:

Welches Event muss ich beim generieren des GriedViews abfangen um die Farbe der Zeile abändern zu können?

Und wie kann ich auf den Inhalt einer Zelle zugreifen, um mit deren Werten zu arbeiten?

Vielen Dank im Vorraus!

Gruß,

Andreas

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.