Example of FIFA Statistics in ASP.NET Core Data Grid Control
In this demo, the Syncfusion DataGrid displays comprehensive FIFA World Cup records and statistics, covering the entire history of the tournament from 1930 to 2022. The FIFA World Cup statistics and data utilized in this application are sourced from Wikipedia . We sincerely thank Wikipedia for their invaluable resource, which has been instrumental in preparing this demonstration.
@Html.UiGrid(new UiGridOptions
{
Id = "Grid",
Data = ViewData["dataSource"],
GridLines = UiGridLines.Both,
AllowSorting = true,
EnableStickyHeader = true,
AllowTextWrap = true,
TextWrapSettings = new UiTextWrapSettings { WrapMode = UiWrapMode.Content },
EnableAltRow = true,
EnableHover = false,
OnQueryCellInfo = "queryCellInfo",
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "Year", HeaderText = "Year", Type = UiColumnType.Number, TextAlign = UiTextAlign.Right, Width = 100, IsPrimaryKey = true },
new UiGridColumn { Field = "Host", HeaderText = "Organizer", Width = 140 },
new UiGridColumn { Field = "Champions", HeaderText = "Champions", Width = 140 },
new UiGridColumn { Field = "Coach", HeaderText = "Winning Coach", Width = 185 },
new UiGridColumn { Field = "TopScorer", HeaderText = "Most Scorer(s)", Width = 185 },
new UiGridColumn { Field = "BestPlayerAward", HeaderText = "Player of season", Width = 170 }
}
})
<style>
#Grid .goal path { fill: #2b2b2b; }
#Grid .flag { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 15px; margin-right: 6px; border-radius: 2px; color: #fff; font-size: 8px; font-weight: 700; vertical-align: middle; }
#Grid .infotooltip { cursor: help; text-decoration: underline dotted; color: inherit; }
#Grid .goals { margin-top: 4px; line-height: 0; }
#Grid .goals .goal { margin-right: 2px; }
.fifa_tooltip { position: absolute; z-index: 2000; max-width: 380px; padding: 12px; border-radius: 15px; background: #fff; color: #212121; border: 1px solid #ccc; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); font-size: 14px; line-height: 20px; }
</style>
@Html.UiGrid(new UiGridOptions
{
Id = "Grid",
Data = ViewData["dataSource"],
GridLines = UiGridLines.Both,
AllowSorting = true,
EnableStickyHeader = true,
AllowTextWrap = true,
TextWrapSettings = new UiTextWrapSettings { WrapMode = UiWrapMode.Content },
EnableAltRow = true,
EnableHover = false,
OnQueryCellInfo = "queryCellInfo",
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "Year", HeaderText = "Year", Type = UiColumnType.Number, TextAlign = UiTextAlign.Right, Width = 100, IsPrimaryKey = true },
new UiGridColumn { Field = "Host", HeaderText = "Organizer", Width = 140 },
new UiGridColumn { Field = "Champions", HeaderText = "Champions", Width = 140 },
new UiGridColumn { Field = "Coach", HeaderText = "Winning Coach", Width = 185 },
new UiGridColumn { Field = "TopScorer", HeaderText = "Most Scorer(s)", Width = 185 },
new UiGridColumn { Field = "BestPlayerAward", HeaderText = "Player of season", Width = 170 }
}
})
<script>
// The text of the hover popups (Syncfusion's Tooltip), by name.
var countryInfo = @Html.Raw((string)ViewData["countryInfo"]);
var teamInfo = @Html.Raw((string)ViewData["teamInfo"]);
var coachInfo = @Html.Raw((string)ViewData["coachInfo"]);
var topScorerInfo = @Html.Raw((string)ViewData["topScorerInfo"]);
var bestPlayerInfo = @Html.Raw((string)ViewData["bestPlayerInfo"]);
function infoOf(table, name) { return (table[0] || {})[String(name).replace(/ /g, '_')] || ''; }
// Syncfusion shows the flag and photo files; here a country is its letters on a colour (the pictures are not part of this demo).
function flag(country) {
var span = document.createElement('span');
span.className = 'flag';
var hue = 0;
String(country || '').split('').forEach(function (c) { hue = (hue * 31 + c.charCodeAt(0)) % 360; });
span.style.background = 'hsl(' + hue + ', 55%, 42%)';
span.textContent = String(country || '').replace(/[^A-Za-z]/g, '').slice(0, 3).toUpperCase();
span.title = country;
return span;
}
var tip = null;
function showTip(target, html) {
hideTip();
if (!html) { return; }
tip = document.createElement('div');
tip.className = 'fifa_tooltip';
tip.setAttribute('role', 'tooltip');
tip.innerHTML = html; // the texts of the sample's own data (never row values)
document.body.appendChild(tip);
var r = target.getBoundingClientRect();
tip.style.left = Math.max(8, Math.min(r.left + window.pageXOffset, document.documentElement.clientWidth - tip.offsetWidth - 8)) + 'px';
tip.style.top = Math.max(8, r.top + window.pageYOffset - tip.offsetHeight - 8) + 'px';
}
function hideTip() { if (tip && tip.parentNode) { tip.parentNode.removeChild(tip); } tip = null; }
function goals(count) {
var holder = document.createElement('div');
holder.className = 'goals';
for (var i = 0; i < count; i++) {
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('class', 'goal');
svg.setAttribute('width', '14');
svg.setAttribute('height', '14');
svg.setAttribute('viewBox', '0 0 14 14');
var circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
circle.setAttribute('cx', '7');
circle.setAttribute('cy', '7');
circle.setAttribute('r', '6');
circle.setAttribute('fill', 'none');
circle.setAttribute('stroke', '#2b2b2b');
circle.setAttribute('stroke-width', '1.5');
var core = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
core.setAttribute('cx', '7');
core.setAttribute('cy', '7');
core.setAttribute('r', '2.5');
core.setAttribute('fill', '#2b2b2b');
svg.appendChild(circle);
svg.appendChild(core);
holder.appendChild(svg);
}
return holder;
}
// Syncfusion's queryCellInfo: the cells hold one or several names (comma separated) with a flag and a hover text; the goals are drawn under the scorers; equal winners in a row share one cell.
function queryCellInfo(args) {
var field = args.column, d = args.data;
if (['Host', 'Champions', 'Coach', 'TopScorer', 'BestPlayerAward'].indexOf(field) < 0) { return; }
var values = String(d[field]).split(',');
var countries = d.TopScorerCountry ? d.TopScorerCountry.split(',') : [];
var box = document.createElement('div');
values.forEach(function (value, i) {
value = value.trim();
var line = document.createElement('div');
var country = field === 'Host' ? value : field === 'Champions' || field === 'Coach' ? d.Champions : field === 'TopScorer' ? countries[i] : d.BestPlayerCountry;
var plain = (field === 'TopScorer' && (value.indexOf('Players') > -1 || value.indexOf('Ronaldo') > -1)) ||
(field === 'BestPlayerAward' && ['Not awarded', 'Mario Kempes', 'Paolo Rossi', 'Salvatore Schillaci'].indexOf(value) > -1);
if (!((field === 'TopScorer' && value.indexOf('Players') > -1) || value === 'Not awarded')) { line.appendChild(flag(country)); }
var name = document.createElement(plain ? 'span' : 'a');
name.textContent = value;
if (!plain) {
name.className = 'infotooltip';
name.href = '#';
name.title = value;
var html = field === 'Host' ? infoOf(countryInfo, value) : field === 'Champions' ? infoOf(teamInfo, value) : field === 'Coach' ? infoOf(coachInfo, value)
: field === 'TopScorer' ? infoOf(topScorerInfo, value) : infoOf(bestPlayerInfo, value);
name.addEventListener('click', function (e) { e.preventDefault(); });
name.addEventListener('mouseenter', function () { showTip(name, html); });
name.addEventListener('mouseleave', hideTip);
name.addEventListener('focus', function () { showTip(name, html); });
name.addEventListener('blur', hideTip);
}
line.appendChild(name);
box.appendChild(line);
});
if (field === 'TopScorer') { box.appendChild(goals(d.TotalGoal)); }
args.content = box;
if (field === 'BestPlayerAward') {
// the same player in the rows that follow share one cell
var rows = window.Lumen.get('Grid').getCurrentViewRecords();
var at = rows.indexOf(d);
if (at >= 0) {
var span = 1;
while (at + span < rows.length && rows[at + span][field] === d[field]) { span++; }
args.rowSpan = span;
}
}
}
</script>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Lumen.UI.Mvc;
namespace YourApp.Controllers
{
public class GridController : Controller
{
// The page is Views/Grid/FifaStatistics.cshtml; it draws what ViewData holds.
public ActionResult FifaStatistics()
{
ViewData["dataSource"] = FIFAStatisticsData.GetAllRecords();
// the texts of the hover popups, as JSON for the page
ViewData["countryInfo"] = UiJson.Serialize(FIFAStatisticsDataSource.CountryInfo);
ViewData["teamInfo"] = UiJson.Serialize(FIFAStatisticsDataSource.TeamInfo);
ViewData["coachInfo"] = UiJson.Serialize(FIFAStatisticsDataSource.CoachInfo);
ViewData["topScorerInfo"] = UiJson.Serialize(FIFAStatisticsDataSource.TopScorerInfo);
ViewData["bestPlayerInfo"] = UiJson.Serialize(FIFAStatisticsDataSource.BestPlayerInfo);
return View();
}
public class FIFAStatisticsData
{
public int Year { get; set; }
public string Host { get; set; }
public string Champions { get; set; }
public string Coach { get; set; }
public string TopScorer { get; set; }
public string BestPlayerAward { get; set; }
public string BestPlayerCountry { get; set; }
public string TopScorerCountry { get; set; }
public int TotalGoal { get; set; }
public static List<FIFAStatisticsData> GetAllRecords()
{
List<FIFAStatisticsData> fifaRecords = new List<FIFAStatisticsData>();
if (fifaRecords.Count == 0)
{
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1930,
Host = "Uruguay",
Champions = "Uruguay",
Coach = "Alberto Suppici",
TopScorer = "Guillermo Stábile",
TopScorerCountry = "Argentina",
TotalGoal = 8,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1934,
Host = "Italy",
Champions = "Italy",
Coach = "Vittorio Pozzo",
TopScorer = "Oldřich Nejedlý",
TopScorerCountry = "Czechoslovakia",
TotalGoal = 5,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1938,
Host = "France",
Champions = "Italy",
Coach = "Vittorio Pozzo",
TopScorer = "Leônidas",
TopScorerCountry = "Brazil",
TotalGoal = 7,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1950,
Host = "Brazil",
Champions = "Uruguay",
Coach = "Juan López",
TopScorer = "Ademir",
TopScorerCountry = "Brazil",
TotalGoal = 9,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1954,
Host = "Switzerland",
Champions = "West Germany",
Coach = "Sepp Herberger",
TopScorer = "Sándor Kocsis",
TopScorerCountry = "Hungary",
TotalGoal = 11,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1958,
Host = "Sweden",
Champions = "Brazil",
Coach = "Vicente Feola",
TopScorer = "Just Fontaine",
TopScorerCountry = "France",
TotalGoal = 13,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1962,
Host = "Chile",
Champions = "Brazil",
Coach = "Aymoré Moreira",
TopScorer = "Six Players",
TopScorerCountry = "",
TotalGoal = 4,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1966,
Host = "England",
Champions = "England",
Coach = "Alf Ramsey",
TopScorer = "Eusébio",
TopScorerCountry = "Portugal",
TotalGoal = 9,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1970,
Host = "Mexico",
Champions = "Brazil",
Coach = "Mário Zagallo",
TopScorer = "Gerd Müller",
TopScorerCountry = "Germany",
TotalGoal = 10,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1974,
Host = "West Germany",
Champions = "West Germany",
Coach = "Helmut Schön",
TopScorer = "Grzegorz Lato",
TopScorerCountry = "Poland",
TotalGoal = 7,
BestPlayerAward = "Not awarded",
BestPlayerCountry = ""
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1978,
Host = "Argentina",
Champions = "Argentina",
Coach = "César Luis Menotti",
TopScorer = "Mario Kempes",
TopScorerCountry = "Argentina",
TotalGoal = 6,
BestPlayerAward = "Mario Kempes",
BestPlayerCountry = "Argentina"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1982,
Host = "Spain",
Champions = "Italy",
Coach = "Enzo Bearzot",
TopScorer = "Paolo Rossi",
TopScorerCountry = "Italy",
TotalGoal = 6,
BestPlayerAward = "Paolo Rossi",
BestPlayerCountry = "Italy"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1986,
Host = "Mexico",
Champions = "Argentina",
Coach = "Carlos Bilardo",
TopScorer = "Gary Lineker",
TopScorerCountry = "England",
TotalGoal = 6,
BestPlayerAward = "Diego Maradona",
BestPlayerCountry = "Argentina"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1990,
Host = "Italy",
Champions = "West Germany",
Coach = "Franz Beckenbauer",
TopScorer = "Salvatore Schillaci",
TopScorerCountry = "Italy",
TotalGoal = 6,
BestPlayerAward = "Salvatore Schillaci",
BestPlayerCountry = "Italy"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1994,
Host = "United States",
Champions = "Brazil",
Coach = "Carlos Alberto Parreira",
TopScorer = "Hristo Stoichkov,Oleg Salenko",
TopScorerCountry = "Bulgaria,Russia",
TotalGoal = 6,
BestPlayerAward = "Romário",
BestPlayerCountry = "Brazil"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 1998,
Host = "France",
Champions = "France",
Coach = "Aimé Jacquet",
TopScorer = "Davor Šuker",
TopScorerCountry = "Croatia",
TotalGoal = 6,
BestPlayerAward = "Ronaldo",
BestPlayerCountry = "Brazil"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 2002,
Host = "South Korea,Japan",
Champions = "Brazil",
Coach = "Luiz Felipe Scolari",
TopScorer = "Ronaldo",
TopScorerCountry = "Brazil",
TotalGoal = 8,
BestPlayerAward = "Oliver Kahn",
BestPlayerCountry = "Germany"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 2006,
Host = "Germany",
Champions = "Italy",
Coach = "Marcello Lippi",
TopScorer = "Miroslav Klose",
TopScorerCountry = "Germany",
TotalGoal = 5,
BestPlayerAward = "Zinedine Zidane",
BestPlayerCountry = "France"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 2010,
Host = "South Africa",
Champions = "Spain",
Coach = "Vicente del Bosque",
TopScorer = "Four Players",
TopScorerCountry = "",
TotalGoal = 5,
BestPlayerAward = "Diego Forlán",
BestPlayerCountry = "Uruguay"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 2014,
Host = "Brazil",
Champions = "Germany",
Coach = "Joachim Löw",
TopScorer = "James Rodríguez",
TopScorerCountry = "Colombia",
TotalGoal = 6,
BestPlayerAward = "Lionel Messi",
BestPlayerCountry = "Argentina"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 2018,
Host = "Russia",
Champions = "France",
Coach = "Didier Deschamps",
TopScorer = "Harry Kane",
TopScorerCountry = "England",
TotalGoal = 6,
BestPlayerAward = "Luka Modrić",
BestPlayerCountry = "Croatia"
});
fifaRecords.Add(new FIFAStatisticsData
{
Year = 2022,
Host = "Qatar",
Champions = "Argentina",
Coach = "Lionel Scaloni",
TopScorer = "Kylian Mbappé",
TopScorerCountry = "France",
TotalGoal = 8,
BestPlayerAward = "Lionel Messi",
BestPlayerCountry = "Argentina"
});
}
return fifaRecords;
}
}
public class FIFAStatisticsDataSource
{
// List of country names that have WebP images.
public static List<string> WebpFiles { get; } = new List<string>
{ "Argentina", "France", "Germany", "West Germany", "Japan", "Mexico", "South Korea", "Switzerland", "United States", "Czechoslovakia", "Portugal" };
// Tooltip content for countries.
public static List<Dictionary<string, string>> CountryInfo { get; } =
new List<Dictionary<string, string>> {
new Dictionary<string, string>
{
{ "Uruguay", "<b>Uruguay</b>, officially the Oriental Republic of Uruguay, is a country in South America. It shares borders with Argentina to its west and southwest and Brazil to its north and northeast, while bordering the Río de la Plata to the south and the Atlantic Ocean to the southeast." },
{ "Italy", "<b>Italy</b>, officially the Italian Republic, is a country in Southern and Western Europe. It is located on a peninsula that extends into the middle of the Mediterranean Sea, with the Alps on its northern land border, as well as islands, notably Sicily and Sardinia." },
{ "France", "<b>France</b>, officially the French Republic, is a country located primarily in Western Europe. It also includes overseas regions and territories in the Americas and the Atlantic, Pacific and Indian oceans, giving it one of the largest discontiguous exclusive economic zones in the world." },
{ "Brazil", "<b>Brazil</b>, officially the Federative Republic of Brazil, is the largest and easternmost country in South America and in Latin America. Brazil is the world's fifth-largest country by area and the seventh most populous. Its capital is Brasília, and its most populous city is São Paulo." },
{ "Switzerland", "<b>Switzerland</b>, officially the Swiss Confederation, is a landlocked country located in west-central Europe. It is bordered by Italy to the south, France to the west, Germany to the north and Austria and Liechtenstein to the east. Switzerland is geographically divided among the Swiss Plateau, the Alps and the Jura." },
{ "Sweden","<b>Sweden</b>, formally the Kingdom of Sweden, is a Nordic country located on the Scandinavian Peninsula in Northern Europe. At 450,295 square kilometres, Sweden is the largest Nordic country and the fifth-largest country in Europe. The capital and largest city is Stockholm." },
{ "Chile", "<b>Chile</b>, officially the Republic of Chile, is a country in western South America. It is the southernmost country in the world and the closest to Antarctica, stretching along a narrow strip of land between the Andes Mountains and the Pacific Ocean." },
{ "England", "<b>England</b> is a country that is part of the United Kingdom. It has land borders with Scotland to the north and Wales to the west, and is otherwise surrounded by the North Sea to the east, the English Channel to the south, the Celtic Sea to the south-west, and the Irish sea to the west."},
{ "Mexico", "<b>Mexico</b>, officially the United Mexican States, is a country in the southern portion of North America. It covers 1,972,550 km2, making it the world's 13th-largest country by area; with a population of almost 130 million, it is the 10th-most-populous country and the most populous Spanish-speaking country."},
{ "West_Germany", "<b>West Germany</b> was the Federal Republic of Germany from its formation on 23 May 1949 until its reunification with East Germany on 3 October 1990. During the Cold War, the western portion of Germany and the associated territory of West Berlin were parts of the Western Bloc." },
{ "Argentina", "<b>Argentina</b>, officially the Argentine Republic, is a country in the southern half of South America. Argentina covers an area of 2,780,400 km2, making it the second-largest country in South America after Brazil, the fourth-largest country in the Americas, and the eighth-largest country in the world." },
{ "Spain", "<b>Spain</b>, or the Kingdom of Spain, is a country located in Southwestern Europe, with parts of its territory in the Atlantic Ocean, the Mediterranean Sea and Africa. It is the largest country in Southern Europe and the fourth-most populous European Union member state." },
{ "United_States", "The <b>United States of America</b>, commonly known as the United States or America, is a country primarily located in North America. It is a federation of 50 states, a federal capital district (Washington, D.C.), and 326 Indian reservations."},
{ "South_Korea", "<b>South Korea</b>, officially the Republic of Korea, is a country in East Asia. It constitutes the southern part of the Korean Peninsula and borders North Korea along the Korean Demilitarized Zone; though it also claims the land border with China and Russia." },
{ "Japan", "<b>Japan</b> is an island country in East Asia. It is in the northwest Pacific Ocean and is bordered on the west by the Sea of Japan, extending from the Sea of Okhotsk in the north toward the East China Sea, Philippine Sea, and Taiwan in the south." },
{ "Germany", "<b>Germany</b>, officially the Federal Republic of Germany, is a country in the western region of Central Europe. It is the second-most populous country in Europe after Russia and the most populous member state of the European Union. Germany lies between the Baltic and North Sea to the north and the Alps to the south."},
{ "South_Africa", "<b>South Africa</b>, officially the Republic of South Africa, is the southernmost country in Africa. It is bounded to the south by 2,798 kilometres of coastline that stretches along the South Atlantic and Indian Oceans; to the north by the neighbouring countries of Namibia, Botswana, and Zimbabwe; and to the east and northeast by Mozambique and Eswatini."},
{ "Russia", "<b>Russia</b>, or the Russian Federation, is a country spanning Eastern Europe and North Asia. It is the largest country in the world by area, extending across eleven time zones and sharing land borders with fourteen countries.[d] It is the world's ninth-most populous country and Europe's most populous country." },
{ "Qatar", "<b>Qatar</b>, officially the State of Qatar, is a country in West Asia. It occupies the Qatar Peninsula on the northeastern coast of the Arabian Peninsula in the Middle East; it shares its sole land border with Saudi Arabia to the south, with the rest of its territory surrounded by the Persian Gulf." }
}
};
// Tooltip content for teams.
public static List<Dictionary<string, string>> TeamInfo { get; } =
new List<Dictionary<string, string>> {
new Dictionary<string, string>
{
{ "Uruguay", "The <b>Uruguay national football team</b> represents Uruguay in international men's football, and is administered by the Uruguayan Football Association, the governing body for football in Uruguay. The national team is commonly referred to as La Celeste (The Sky Blue)." },
{ "Italy", "The <b>Italy national football team</b> has represented Italy in men's international football since its first match in 1910. The national team is controlled by the Italian Football Federation (FIGC), the governing body for football in Italy, which is a co-founder and member of UEFA." },
{ "Germany", "The <b>Germany national football team</b> represents Germany in men's international football and played its first match in 1908. The team is governed by the German Football Association, founded in 1900."},
{ "West_Germany", "The <b>Germany national football team</b> represents Germany in men's international football and played its first match in 1908. The team is governed by the German Football Association, founded in 1900."},
{ "Brazil", "The <b>Brazil national football team</b>, nicknamed Seleção Canarinha, represents Brazil in men's international football and is administered by the Brazilian Football Confederation (CBF), the governing body for football in Brazil." },
{ "England", "The <b>England national football team</b> have represented England in international football since the first international match in 1872. It is controlled by The Football Association (FA), the governing body for football in England." },
{ "Argentina", "The <b>Argentina national football team</b> represents Argentina in men's international football and is administered by the Argentine Football Association, the governing body for football in Argentina. Nicknamed La Albiceleste ('The White and Sky Blue'), they are the reigning world champions."},
{ "France", "The <b>France national football team</b> represents France in men's international football. It is controlled by the French Football Federation, the governing body for football in France. It is a member of UEFA in Europe and FIFA in global competitions."},
{ "Spain", "The <b>Spain national football team</b> has represented Spain in men's international football competitions since 1920. It is governed by the Royal Spanish Football Federation, the governing body for football in Spain. Spain is one of eight national teams to have been crowned world champions." },
{ "Czechoslovakia", "The <b>Czechoslovakia national football team</b> represented Czechoslovakia in men's international football from 1919 to 1993. The team was controlled by the Czechoslovak Football Association, and the team qualified for eight World Cups and three European Championships." },
{ "Hungary", "The <b>Hungary national football team</b> represents Hungary in men's international football, and is controlled by the Hungarian Football Federation. The team has made nine appearances in the FIFA World Cup, and five in the UEFA European Championship."},
{ "Portugal", "The <b>Portugal national football team</b> has represented Portugal in men's international football competitions since 1921. The national team is controlled by the Portuguese Football Federation (FPF), the governing body for football in Portugal. " },
{ "Poland", "The <b>Poland national football team</b> represents Poland in men's international football competitions since their first match in 1921. They are known by the nicknames 'The White-Reds' and 'The Eagles', symbolized by their coat of arms featuring a white eagle on a red background."},
{ "Bulgaria", "The <b>Bulgaria national football team</b> represents Bulgaria in men's international football, and is administered by the Bulgarian Football Union, a member association of UEFA. Bulgaria's best achievements are reaching the final at the 1968 Summer Olympics."},
{ "Russia","The <b>Russia national football team</b> represents Russia in men's international football. It is controlled by the Russian Football Union, the governing body for football in Russia. Russia's home ground is the Luzhniki Stadium in Moscow and their head coach is Valery Karpin."},
{ "Croatia", "The <b>Croatia national football team</b> represents Croatia in international football matches. It is governed by the Croatian Football Federation (HNS), the governing body for football in Croatia. It is a member of UEFA in Europe and FIFA in global competitions. The team's colours reference two national symbols: the Croatian checkerboard and the country's tricolour. They are colloquially referred to as the Vatreni and Kockasti." },
{ "Colombia", "The <b>Colombia national football team</b> represents Colombia in men's international football and is managed by the Colombian Football Federation, the governing body for football in Colombia. They are a member of CONMEBOL and are currently ranked 14th in the FIFA World Rankings." }
}
};
// Tooltip content for coaches.
public static List<Dictionary<string, string>> CoachInfo { get; } =
new List<Dictionary<string, string>> {
new Dictionary<string, string>
{
{ "Alberto_Suppici", "<b>Alberto Horacio Suppici</b> was a Uruguayan footballer and coach who won the first ever FIFA World Cup, leading the Uruguay team in the 1930 tournament on home soil. Suppici is known as el Profesor (the Professor). His cousin was the professional driver Héctor Suppici Sedes." },
{ "Vittorio_Pozzo", "<b>Vittorio Pozzo</b> was an Italian football player, manager and journalist. The creator of the Metodo tactical formation, Pozzo is regarded as one of the greatest managers of all time, and is the only manager to guide a national team to two FIFA World Cup titles as coach."},
{ "Juan_López", "<b>Juan López Fontana</b> was a Uruguayan professional football manager who won the 1950 FIFA World Cup as the head coach of the Uruguay national team." },
{ "Sepp_Herberger", "<b>Josef Sepp Herberger</b> was a German football player and manager. He is most famous for being the manager of the West Germany national team that won the 1954 FIFA World Cup final, a match later dubbed The Miracle of Bern, defeating the overwhelming favourites from Hungary."},
{ "Vicente_Feola", "<b>Vicente Ítalo Feola</b> was a Brazilian football manager and coach from São Paulo. He is best known for leading the Brazil national team to its first FIFA World Cup title in 1958."},
{ "Aymoré_Moreira", "<b>Aymoré Moreira</b> was a Brazilian football player and coach, who played as a goalkeeper. He was a brother of Zezé Moreira and Ayrton Moreira, both of whom were also successful coaches in Brazilian football." },
{ "Alf_Ramsey", "<b>Sir Alfred Ernest Ramsey</b> was an English football player and manager. As a player, he represented the England national team and captained the side, but he is best known for his time as England manager from 1963 to 1974, which included guiding them to victory in the 1966 FIFA World Cup."},
{ "Mário_Zagallo", "<b>Mário Jorge Lobo Zagallo</b> was a Brazilian professional football player, coordinator and manager, who played as a forward. Zagallo holds the record for World Cup titles in general with four titles in total."},
{ "Helmut_Schön", "<b>Helmut Schön</b> was a German football player and manager. He is best remembered for his exceptional career as manager of the West Germany national team in four consecutive World Cup tournaments, including winning the title in 1974, losing in the final in 1966, and coming in third in 1970."},
{ "César_Luis_Menotti", "<b>César Luis Menotti</b>, known as El Flaco (Slim), was an Argentine football player and manager who won the 1978 FIFA World Cup as the head coach of the Argentina national team. Menotti played as a striker, most notably for Argentine clubs Rosario Central and Boca Juniors."},
{ "Enzo_Bearzot", "<b>Enzo Bearzot Grande Ufficiale OMRI</b> was an Italian professional football player and manager. A defender and midfielder, he led the Italy national team to victory in the 1982 FIFA World Cup. Nicknamed Vecio (standard Italian vecchio, 'old man'), Bearzot coached the Italy national team the most."},
{ "Carlos_Bilardo", "<b>Carlos Salvador Bilardo</b> is an Argentine former physician, football player, and manager. Bilardo achieved worldwide renown as a player with Estudiantes de La Plata in the 1960s, and as the manager of the Argentina side that won the 1986 FIFA World Cup and came close to retaining the title in 1990."},
{ "Franz_Beckenbauer", "<b>Franz Anton Beckenbauer</b> was a German professional football player, manager, and official. Nicknamed der Kaiser (the Emperor), he is widely regarded as one of the greatest players of all time, and is one of nine players to have won the FIFA World Cup, the European Champions Cup, and the Ballon d'Or."},
{ "Carlos_Alberto_Parreira", "<b>Carlos Alberto Gomes Parreira</b> is a Brazilian former football manager who holds the record for attending the most FIFA World Cup final tournaments as manager with six appearances. He also managed five different national teams in five editions of the FIFA World Cup." },
{ "Aimé_Jacquet", "<b>Aimé Étienne Jacquet</b> is a French former professional football player and manager. He coached the France national team that won the 1998 FIFA World Cup in France, the country's first title." },
{ "Luiz_Felipe_Scolari", "<b>Luiz Felipe Scolari OIH</b>, also known as Felipão (Big Phil), is a Brazilian football manager and former player. Scolari was a defender during his playing days, and notably represented Caxias before moving to a managerial role in 1982." },
{ "Marcello_Lippi", "<b>Marcello Romeo Lippi Commendatore OMRI</b> is an Italian former professional football player and manager, who led the Italy national team to victory in the 2006 FIFA World Cup. He was appointed as Italy head coach in the summer of 2004 and 2008." },
{ "Vicente_del_Bosque", "<b>Vicente del Bosque González</b>, 1st Marquess of Del Bosque is a Spanish retired football manager and former player. He is regarded as one of the greatest managers of all time and is to date the only football manager to have won the World Cup, the Champions League, the European Championship." },
{ "Joachim_Löw", "<b>Joachim Jogi Löw</b> is a German football coach and former player. He was the manager of the Germany national team from 2006 until 2021. During his tenure as manager, he led Germany to victory at the 2014 FIFA World Cup in Brazil and the 2017 FIFA Confederations Cup in Russia."},
{ "Didier_Deschamps", "<b>Didier Claude Deschamps</b> is a French professional football manager and former player who has been managing the France national team since 2012. He played as a defensive midfielder for several clubs, in France, Italy, England and Spain, namely Marseille, Juventus, Chelsea."},
{ "Lionel_Scaloni", "<b>Lionel Sebastián Scaloni</b> is an Argentine professional football manager and former player who is the manager of the Argentina national team that won the 2022 FIFA World Cup. A versatile player, he operated as a right-back or right midfielder." }
}
};
// Tooltip content for top scorers.
public static List<Dictionary<string, string>> TopScorerInfo { get; } =
new List<Dictionary<string, string>> {
new Dictionary<string, string>
{
{ "Guillermo_Stábile", "<b>Guillermo Stábile</b> was an Argentine professional football player and manager who played as a centre forward. At club level, Stábile won two national championships with Huracán and played in Italy and France. He was the top scorer of 1930 World Cup."},
{ "Oldřich_Nejedlý", "<b>Oldřich Nejedlý</b> was a Czech footballer, who spent his entire professional career at Sparta Prague as an inside-forward. He is considered to be one of Czechoslovakia's greatest players of all time. He was the top goalscorer of the 1934 World Cup." },
{ "Leônidas", "<b>Leônidas da Silva</b> was a Brazilian professional footballer who played as a forward. He is regarded as one of the most important players of the first half of the 20th century. At the height of his career, Leônidas da Silva was very popular amongst the people of Brazil and Rio de Janeiro."},
{ "Ademir", "<b>Ademir Marques de Menezes</b> was a Brazilian footballer, regarded as one of the best forwards in football history. His prominent underbite earned him the nickname Queixada, which means jaw. He was also the top goalscorer in the 1950 FIFA World Cup." },
{ "Sándor_Kocsis", "<b>Sándor Péter Kocsis</b> was a Hungarian footballer who played for Ferencvárosi TC, Budapest Honvéd, Young Fellows Zürich, FC Barcelona and Hungary as a striker." },
{ "Just_Fontaine", "<b>Just Louis Fontaine</b> was a French professional footballer who played as a striker. He scored the most goals ever in a single edition of the FIFA World Cup, with thirteen in six matches in the 1958 FIFA World Cup tournament." },
{ "Eusébio","<b>Eusébio da Silva Ferreira GCIH GCM</b>, nicknamed the Black Panther, the Black Pearl or O Rei (The King),was a Portuguese footballer who played as a striker. He is considered one of the greatest players of all time as well as Benfica's best player ever." },
{ "Gerd_Müller", "<b>Gerhard 'Gerd' Müller</b> was a German professional footballer. A prolific striker, especially in and around the six-yard box, he is widely regarded as one of the greatest goalscorers in the history of the sport."},
{ "Grzegorz_Lato","<b>Grzegorz Bolesław Lato</b> is a Polish former professional football player and manager who played as a winger. He was a member of Poland's golden generation of football players who rose to fame in the 1970s and early 80s."},
{ "Mario_Kempes", "<b>Mario Alberto Kempes Chiodi</b> is an Argentine former professional footballer who played as a striker or attacking midfielder. A prolific goalscorer, he finished as La Liga's top goalscorer twice with Valencia where he amassed 116 goals in 184 league games. He is regarded as one of the best players of all time." },
{ "Paolo_Rossi", "<b>Paolo Rossi</b> was an Italian professional footballer who played as a forward. He led Italy to the 1982 FIFA World Cup title, scoring six goals to win the Golden Boot as top goalscorer, and the Golden Ball for the player of the tournament."},
{ "Gary_Lineker", "<b>Gary Winston Lineker OBE</b> is an English sports broadcaster and former professional footballer. Lineker is the only player to have been the top goalscorer in England with three clubs: Leicester City, Everton and Tottenham Hotspur. He also played for Barcelona in Spain, and won 80 caps for England." },
{ "Salvatore_Schillaci", "<b>Salvatore Schillaci Cavaliere OMRI</b> is an Italian former professional footballer, who played as a striker. During his club career, he played for Messina (1982–1989), Juventus (1989–1992), Internazionale (1992–1994) and Júbilo Iwata (1994–1997)." },
{ "Hristo_Stoichkov", "<b>Hristo Stoichkov</b> is a Bulgarian former professional footballer who is a football commentator for TUDN. A prolific forward, he is regarded as one of the best forwards of all time, and as the greatest Bulgarian footballer of all time." },
{ "Oleg_Salenko", "<b>Oleg Anatolyevich Salenko</b> is a Russian-Ukrainian former footballer who played as a forward. He scored a record five goals in a group-stage match in the 1994 World Cup, helping him earn the Golden Boot as joint-top tournament goalscorer." },
{ "Davor_Šuker", "<b>Davor Šuker</b> is a Croatian football administrator and former professional player who played as a striker. He served as the president of the Croatian Football Federation from 2012 to 2021. As Croatia's all-time top scorer with 45 goals, Šuker is generally regarded as the greatest Croatian striker of all time"},
{ "Miroslav_Klose", "<b>Miroslav Josef Klose</b> is a German professional football manager and former player. A striker, Klose is the all-time top scorer for Germany and holds the record for the most goals scored in the FIFA World Cup with 16 goals scored over 4 editions of the tournament between 2002 and 2014."},
{ "James_Rodríguez", "<b>James David Rodríguez Rubio</b> is a Colombian professional footballer who plays as an attacking midfielder or winger for Campeonato Brasileiro Série A club São Paulo and the Colombia national team. He has been praised for his technique, vision, and playmaking skills." },
{ "Harry_Kane", "<b>Harry Edward Kane MBE</b> is an English professional footballer who plays as a striker for Bundesliga club Bayern Munich and captains the England national team. A prolific goalscorer with strong link play, Kane is regarded as one of the best players in the world and one of the best strikers of his generation." },
{ "Kylian_Mbappé", "<b>Kylian Mbappé Lottin</b> is a French professional footballer who plays as a forward for Ligue 1 club Paris Saint-Germain and captains the France national team. Regarded as one of the best players in the world, he is known for his dribbling, speed, and finishing."}
}
};
// Tooltip content for best players.
public static List<Dictionary<string, string>> BestPlayerInfo { get; } =
new List<Dictionary<string, string>> {
new Dictionary<string, string>
{
{ "Diego_Maradona", "<b>Diego Armando Maradona</b> was an Argentine professional football player and manager. Widely regarded as one of the greatest players in the history of the sport, he was one of the two joint winners of the FIFA Player of the 20th Century award." },
{ "Romário", "<b>Romário de Souza Faria</b>, known simply as Romário, is a Brazilian politician and former professional footballer. A prolific striker renowned for his clinical finishing, he scored over 700 goals and is one of the few players to score at least 100 goals for three clubs."},
{ "Ronaldo", "<b>Ronaldo Luís Nazário de Lima</b>, known as Ronaldo or Ronaldo Nazário, is a Brazilian former professional footballer who played as a striker. He is the owner of Brasileiro Série A club Cruzeiro and owner and president of Segunda División club Real Valladolid. Nicknamed O Fenômeno ('The Phenomenon') and R9." },
{ "Oliver_Kahn", "<b>Oliver Rolf Kahn</b> is a German football executive and former professional player who played as a goalkeeper. He started his career in the Karlsruher SC Junior team in 1975. Twelve years later, Kahn made his debut match in the professional squad. In 1994, he was transferred to Bayern Munich for the fee of DM 4.6 million."},
{ "Zinedine_Zidane", "<b>Zinedine Yazid Zidane</b>, popularly known as Zizou, is a French professional football manager and former player who played as an attacking midfielder. He most recently coached Spanish club Real Madrid and is one of the most successful coaches in the world." },
{ "Diego_Forlán", "<b>Diego Martín Forlán Corazo</b> is a Uruguayan professional football manager and former player who played as a striker. Regarded as one of the best forwards of his generation, Forlán is a two-time winner of both the Pichichi Trophy and the European Golden Shoe at club level."},
{ "Lionel_Messi", "<b>Lionel Andrés Messi</b> is an Argentine professional footballer who plays as a forward for and captains both Major League Soccer club Inter Miami and the Argentina national team. Widely regarded as one of the greatest players of all time," },
{ "Luka_Modrić", "<b>Luka Modrić</b> is a Croatian professional footballer who plays as a midfielder for La Liga club Real Madrid and captains the Croatia national team. He plays mainly as a central midfielder, but can also play as an attacking midfielder or as a defensive midfielder." }
}
};
}
}
}
@* Program.cs *@
builder.Services.AddControllersWithViews().AddLumenUIJson();
builder.Services.AddLumenUI();
// ...
app.UseLumenUI();
@* Views/_ViewImports.cshtml *@
@using Lumen.UI.Mvc
@addTagHelper *, Lumen.UI.Core
@* Views/Shared/_Layout.cshtml *@
<head>
@Html.UiStyles()
<link rel="stylesheet" href="~/css/site.css" />
</head>
<body>
@RenderBody()
@Html.UiScripts()
@await RenderSectionAsync("scripts", required: false)
</body>
@* Grids with a DataUrl: @Html.AntiForgeryToken() on the page and [HttpPost, ValidateJsonAntiForgeryToken] on the action. *@
This section provides detailed information about the FIFA World Cup, including the year, host country, champion team, top scorer, best player, and winning coach. The data is enhanced with flags, icons, and hyperlinks for easy access to more details. The Grid column template feature allows custom content in grid cells, creating a rich, interactive display.