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.

Empfohlene Antworten

Veröffentlicht

Hallo

Ich möchte mehrere Objekte der Klasse Schüler (ID, Vorname, Nachname, Wohnort) in einer GridView darstellen.

Die Daten kommen aus einer SQLite Datenbank.

Leider verstehe ich nicht ganz wie das Data Binding funktioniert. Ich finde die Tutorials dazu sehr unverständlich und hoffe jemand kann mir das Thema an einem einfachen Code Beispiel erklären.

Frohes neues Jahr!

Bearbeitet von Starschüler
Rechtschreibung verbessert

Grüße dich,

was genau verstehst du daran nicht?
Was hat du bislang probiert?

Ein wenig mehr Input wäre super um dir helfen zu können.

Zitat

In general, to display a collection, you bind the ItemsSource of an items control (such as ListView or GridView) directly to a property that returns a collection. If that's a flat collection of items then you don't need to do anything special. But if it's a collection of group objects (as it is when binding to grouped data) then you need the services of an intermediary object called a CollectionViewSource which sits between the items control and the binding source. You bind the CollectionViewSource to the property that returns grouped data, and you bind the items control to the CollectionViewSource. An extra value-add of a CollectionViewSource is that it keeps track of the current item, so you can keep more than one items control in sync by binding them all to the same CollectionViewSource. You can also access the current item programmatically through the ICollectionView.CurrentItem property of the object returned by the CollectionViewSource.View property.

https://docs.microsoft.com/en-us/windows/uwp/data-binding/data-binding-in-depth

Bearbeitet von r4phi

Am 4.1.2020 um 11:51 schrieb r4phi:

Grüße dich,

was genau verstehst du daran nicht?
Was hat du bislang probiert?

Ein wenig mehr Input wäre super um dir helfen zu können.

https://docs.microsoft.com/en-us/windows/uwp/data-binding/data-binding-in-depth

Mich würde das auch Interessieren, versteh das nämlich auch nicht so ganz ?

Ich hab ne GridView und in dieser GridView, sollen meine Kunden untereinander aufgelistet werden.

Scheinbar passiert das über die ItemSource, aber ich schnall nich, was ich hier übergeben muss. Meine Klasse Kunde?  

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.