Skip to main content

Live Ticket Board

This example is a live DataGridView (ticketsGrid) bound through a BindingSource (ticketsBindingSource) to a BindingList<Ticket>, fed by a simulated ticket service. New tickets arrive at the top, existing tickets change in place, a temporary "updated" marker (●) fades after three seconds, and the row the user selected survives every event.

Run it

cd "LearnWisej-Samples/Real-Time Server Push Course/Module 5/TicketOpsLive"
dotnet run -f net10.0 --urls http://localhost:5305

Then open http://localhost:5305. (Visual Studio: open TicketOpsLive.slnx, press F5.)

What to try

Click a row first — every update below keeps that row selected.

ControlWhat you should see
New ticket every second (20 s)one new row per second at the top, with a ● marker, without any click; the selection does not move
Stop feedthe feed ends before the next ticket; the start button comes back
Randomize statusesthree rows change in place; no row moves
(your selected row changes)the amber warning "Ticket #n changed on the server while you have it open …" — nothing is reloaded; Dismiss closes it
Escalated onlythe grid shows only escalated tickets and keeps updating while the feed runs

Polling fallback. Add "enableWebSocket": false to Default.json and restart: the rows still arrive (about a second late) because polling is requested while the feed runs.