Port DataGridView control from WinForms to Modern.Forms#121
Draft
Port DataGridView control from WinForms to Modern.Forms#121
Conversation
…trolGallery demo panel Agent-Logs-Url: https://github.com/modern-forms/Modern.Forms/sessions/a8e2d3dd-1cb3-4e19-bb8a-bd53fbff1d30 Co-authored-by: jpobst <179295+jpobst@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jpobst
April 8, 2026 02:44
View session
|
|
||
| if (sortOrder == SortOrder.Ascending) { | ||
| path.MoveTo (glyph_x, glyph_y + glyph_size); | ||
| path.LineTo (glyph_x + glyph_size / 2, glyph_y); |
| path.Close (); | ||
| } else { | ||
| path.MoveTo (glyph_x, glyph_y); | ||
| path.LineTo (glyph_x + glyph_size / 2, glyph_y + glyph_size); |
Comment on lines
+577
to
+579
| foreach (var col in Columns) | ||
| if (col.Visible) | ||
| total += LogicalToDeviceUnits (col.Width); |
Comment on lines
+396
to
+403
| if (e.KeyCode == Keys.Down) { | ||
| if (selected_row_index < Rows.Count - 1) { | ||
| SelectedRowIndex = selected_row_index + 1; | ||
| EnsureRowVisible (selected_row_index); | ||
| e.Handled = true; | ||
| return; | ||
| } | ||
| } |
Comment on lines
+405
to
+412
| if (e.KeyCode == Keys.Up) { | ||
| if (selected_row_index > 0) { | ||
| SelectedRowIndex = selected_row_index - 1; | ||
| EnsureRowVisible (selected_row_index); | ||
| e.Handled = true; | ||
| return; | ||
| } | ||
| } |
…, and cell editing - Fix visual artifacts at fractional DPI by using Math.Ceiling in GetContentArea - Fix cursor not updating during mouse move by calling FindForm()?.SetCursor() - Implement actual data sorting when column headers are clicked (numeric + string) - Add DataSource property for data binding (auto-generates columns from properties) - Add cell editing via double-click/F2 with embedded TextBox - Add LostFocus event to Control, SelectAll() to TextBox - Add CellBeginEdit, CellEndEdit, CellValueChanged events - Add ReadOnly property, BeginEdit/EndEdit/CancelEdit methods - Update ControlGallery to demonstrate data binding and editing Agent-Logs-Url: https://github.com/modern-forms/Modern.Forms/sessions/d15aa0dc-cb46-4825-be39-974d7172db65 Co-authored-by: jpobst <179295+jpobst@users.noreply.github.com>
…r comments Agent-Logs-Url: https://github.com/modern-forms/Modern.Forms/sessions/d15aa0dc-cb46-4825-be39-974d7172db65 Co-authored-by: jpobst <179295+jpobst@users.noreply.github.com>
Agent-Logs-Url: https://github.com/modern-forms/Modern.Forms/sessions/8e1380c5-1ba4-466b-9482-4ea3f94cb36c Co-authored-by: jpobst <179295+jpobst@users.noreply.github.com>
Copilot stopped work on behalf of
jpobst due to an error
April 8, 2026 03:18
Agent-Logs-Url: https://github.com/modern-forms/Modern.Forms/sessions/0eba3168-7e8a-43c2-8216-bbe7a1f8e2c7 Co-authored-by: jpobst <179295+jpobst@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.