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.

Event wenn Datagridview ColumnAutoSize abgeschlossen ist

Empfohlene Antworten

Hi,

folgendes Problem:

Ich habe ein Datagridview.

Dessen Spalten werden mit AutoSizeColumnMode = AllCells automatisch angepasst.

damit der Anwender nicht scrollen (horizontal) muss, wird abgefragt wie breit alle Spalten sind und somit die Größe des Parent-Controls des DGV's gesetzt (DGV ist gedockt (Fill)).

Das Problem ist....das anscheinend der Wert abgefragt wird bevor die Spaltengröße durch das AutoSize angepasst wurde....

wenn ich diese Abfrage nämlich 2 mal hintereinander durchführe, erfasst mein programm beim 2. Abfragen die richtige breite....

Das ist aber unschön.

Ich frage es im Form_Load Event ab.

Ich habe auch DGV_Validated getestet...ohne erfolg

Kennt ihr ein Event, welches am besten geeignet wäre?

Ich hoffe ihr könnt mir helfen.

Gruß

Jeff

  • 4 Wochen später...

Hallo,

ich blick nochnicht so ganz durch was du in welchem Event abfrägst...

Normalerweise würde ich sagen im Form_Load: breite abfragen -> breite anpassen - > parent anpassen.

Wenn du etwas vorm Form_Load auslösen möchtest nimm doch den Konstruktor.

LG Cätch

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.