Data binding & layout
The data-bound ticket screen from Module 4 · Data Binding & the DataGridView: a SplitContainer with a
read-only DataGridView on the left and the ticket's details on the right. One BindingSource feeds both,
so selecting a row fills the detail controls. Save Ticket goes through TicketService, then refreshes
the grid on purpose.
Run it
cd "LearnWisej-Samples/Foundations Course/Module 4/WisejTrainingApp"
dotnet run -f net10.0 --urls http://localhost:5084
Then open http://localhost:5084. (Visual Studio: open WisejTrainingApp.slnx, press F5.)
What to try
| Action | What you should see |
|---|---|
| Click a row in the grid | Title, Status, Priority and Created fill in on the right |
| Change the Status, click Save Ticket | the grid row shows the new status; the status bar reads Saved ticket #N |
Where things live
| File | What it's for |
|---|---|
Models/Ticket.cs | The shape of one ticket |
Services/TicketService.cs | GetTickets() and SaveTicket() over an in-memory list |
TicketsWindow.cs | LoadTickets(), the detail bindings, btnSaveTicket_Click |
TicketsWindow.Designer.cs | The layout: splitContainer1, dgvTickets, grpTicketDetails — generated by the Designer |