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.

[Vb.net] Formatieren von Feldinhalten in einem GridView

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe eine Frage. Ich bin noch recht frisch, was das Programmieren mit VB.Net angeht.

Ich will einem Gridview die Feldinhalte so darstellen, dass es wie folgt aussieht:

Gattung: AZB

Sprich die Spaltenüberschrift soll fett und der Wert normal geschrieben werden. Da ich mehrzeilige Gridview-Rows habe, soll die Überschrift mit in die Zelle eingetragen werden.

Ich habe ein Beispiel gefunden, wo das mit HTML-Tags gelöst wurde.

da sieht das so aus als Code

Dim column As GridViewDataColumn = TryCast(e.CellElement.ColumnInfo, GridViewDataColumn)

If column IsNot Nothing AndAlso column.OwnerTemplate.Caption = "Belegungseinheit" Then

If column.FieldName = "Gattung_ID" Then

e.CellElement.Text = "Gattung: " & e.CellElement.RowInfo.Cells("Gattung_ID").Value

End If

End If

wenn ich dies nun mit meinem Code ausprobiere, dann schreibt mir das Programm die Tags mit in die Spalte.

Anzeige im Grid:

<html><b>Name</b>: Mustermann, Max

Meine Frage nun:

Muss ich noch etwas einbinden, damit die Tags umgesetzt werden oder ist diese Lösung so nicht umsetzbar und ich muss mir eine andere Lösung überlegen? Kennt jemand eine alternative Lösung?

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.