DwsDataGrid
API ReferencePaged grid basics
A large data set is shown page by page: PageSizeOptions lists the page sizes on offer and InitialPageSize sets the one used at start. When the pagination bar is narrow (on a phone, or with the grid in a slim column), the page buttons collapse into a compact pager with previous, a picker that shows the current page out of the total, and next.
| Active | Name | Description | Data | Type |
|---|---|---|---|---|
| sytlkopdjg | otjvldwmvrnoolpvvmggssmvyvxvcajvrfilrliw | 92.57143 | Complex | |
| uejhwpsdxc | nvgnwqfakuirwicddjejvdgdbulqynhgypsmedpr | 92.85714 | Standard | |
| dyibloumol | uvlybnpvevwouixhsxihzrcrmdpkxwlpkvpnwyzd | 93.42857 | Standard | |
| lpdadewwdg | ldtulyxfxhkhdyskktyfkitpfxzpgtaolekmucmb | 93.71429 | Complex | |
| jfjnqbelwb | xepgrnddaldjghqieztitdxxugsxegioaordrwyb | 94.28571 | Complex | |
| mzybwiweso | htgrlkugyucpisqnqiasnthpkviqawjdvmgxwzko | 94.57143 | Standard | |
| rgdtttszrs | nawghtlazovpzxkuglzcaksrndkkhlyfdhjlvfyz | 95.14286 | Standard | |
| echfjzmhao | rcifsdibsnqpmrozyanzuohzmlwfbizqfopgdqnu | 95.42857 | Complex | |
| bbernkmuyb | rhidlukbpheaegepvbiggvfmqvtesdflotmmdhjd | 96 | Complex | |
| eaxxnyokmr | vwbvnpbfimcsmkurlosfkuxghpywruouzwyqlitu | 96.28571 | Standard | |
| noszazpjfu | dmillrxgmugigazomqjzvgtezudbktfyjhodpgfc | 96.85714 | Standard | |
| heirzlnzaf | zxtemqowvsohzzmwzfkgczwmwvmlbzgfyehrkltp | 97.14286 | Complex | |
| eiqkskqxvt | acbwmlbavvintdujfjljjguuzlffkwiqdweygtrr | 97.71429 | Complex | |
| vqpmpifhlm | jthhwafvpznskwzwdmrthyqkyjwtpcraermkqywq | 98 | Standard | |
| ijomhyoado | kdhcjmkygjrkabhihmognhawrdhqwhhwuxbjuejc | 98.57143 | Standard | |
| qximfzqblw | adckkfftbybupdaxncdliznjgtuulxrgkyxygktd | 98.85714 | Complex | |
| oukqzlpiew | lkoyzrfvddsdlahjsevgicfedzbvpwocymyzhknp | 99.42857 | Complex | |
| pkijjpslmx | ojfkvaqkfhoqfzcibirgjltkosqrladdpayouxpn | 99.71429 | Standard |
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_BaseGrid" T="ExampleDataElement" Items="@_elementsForExample2" Title="Large Table" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="52">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoBaseGrid_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" Hidden="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGrid_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoBaseGrid_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoBaseGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGrid_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" Sortable="true" VisibilityBreakpoint="DwsVisibilityBreakpoint.XL" />
<DwsDataGridColumn Name="DataGridDemoBaseGrid_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoBaseGrid_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoBaseGrid_Column_Delete" T="ExampleDataElement">
<CellTemplate>
<DwsButton Name="@($"DataGridDemBaseGrido_Delete_{context.Item.ID}")" Appearance="DwsAppearance.Icon" ButtonSize="DwsSize.Medium" Icon="@Icons.BS.Trash" Tooltip="Delete" OnClick="@(() => ButtonAction(@context.Item))" />
</CellTemplate>
</DwsDataGridColumn>
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample2 = ExampleDataElement.GenerateExampleList(330);
private void ButtonAction(ExampleDataElement item)
{
SnackbarNotification.ShowSnackbar(item.Name, DwsSnackbarLevel.Info, "ButtonAction");
}
private DwsContextMenu? _rowMenu;
private static string RowMenuButtonId(ExampleDataElement item) => $"datagrid-demo-rowmenu-{item.ID}";
private List<DwsContextMenuItem> RowMenuItems =>
[
new() { Text = "Edit content", Icon = Icons.BS.Pencil },
new() { Text = "Edit general settings", Icon = Icons.BS.Gear },
DwsContextMenuItem.Separator(),
new() { Text = "Delete", Icon = Icons.BS.Trash, Color = DwsColor.Error },
];
// TargetData is the row's ID, handed over by ShowAtElementAsync.
private void RowMenuItemClick(DwsContextMenuItemClickEventArgs args) =>
SnackbarNotification.ShowSnackbar($"{args.Item.Text}: #{args.TargetData}", DwsSnackbarLevel.Info, "RowMenu");Grid without a card frame (Inline)
Set Inline to drop the card frame around the grid, so that it fits into other content.
| Active | Name | Data | Type | Created |
|---|---|---|---|---|
| ynghynyhvq | 6 | Standard | 12/31/2025 12:00:00 PM | |
| ikaoovrlqb | 6.285714 | Complex | 1/8/2026 12:00:00 PM | |
| urckjzeeyh | 6.571429 | Standard | 1/5/2026 12:00:00 PM | |
| ldbxtfbcox | 6.857143 | Complex | 12/30/2025 12:00:00 PM | |
| ghldzxthbi | 7.142857 | Standard | 1/6/2026 12:00:00 PM | |
| efnvugjdnw | 7.428571 | Complex | 1/6/2026 12:00:00 PM | |
| sczxbezepn | 7.714286 | Standard | 1/5/2026 12:00:00 PM | |
| jbsttnfmod | 8 | Complex | 1/5/2026 12:00:00 PM | |
| ssbolrtbww | 8.285714 | Standard | 12/23/2025 12:00:00 PM | |
| qwkmszdqid | 8.571428 | Complex | 1/13/2026 12:00:00 PM | |
| sngmlnxvad | 8.857142 | Standard | 12/27/2025 12:00:00 PM | |
| ghfvoeqpyb | 9.142858 | Complex | 12/30/2025 12:00:00 PM | |
| sfsojkafqj | 9.428572 | Standard | 1/8/2026 12:00:00 PM | |
| xqhwqnqfed | 9.714286 | Complex | 12/21/2025 12:00:00 PM | |
| ykiaadlgrv | 10 | Standard | 12/20/2025 12:00:00 PM | |
| jmercqhvep | 10.285714 | Complex | 1/9/2026 12:00:00 PM | |
| ekkkvwgccl | 10.571428 | Standard | 12/27/2025 12:00:00 PM | |
| wptdqhvmpc | 10.857142 | Complex | 12/24/2025 12:00:00 PM | |
| bqiagfjspg | 11.142858 | Standard | 12/25/2025 12:00:00 PM | |
| jtrhjegezg | 11.428572 | Complex | 12/17/2025 12:00:00 PM | |
| xykqtehwsm | 11.714286 | Standard | 1/8/2026 12:00:00 PM | |
| imcuvfuofl | 12 | Complex | 1/14/2026 12:00:00 PM | |
| smulhywndo | 12.285714 | Standard | 1/8/2026 12:00:00 PM | |
| kdgnymrbql | 12.571428 | Complex | 12/17/2025 12:00:00 PM | |
| uhbafvwusb | 12.857142 | Standard | 12/26/2025 12:00:00 PM |
Show Code
DataGrid.razor
<DwsDataGrid Name="DataGridDemo_InlineGrid" T="ExampleDataElement" Items="@_elementsForExample3" Title="Table Name" Searchable="false" Inline="true">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoInlineGrid_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Searchable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoInlineGrid_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoInlineGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" Searchable="true" />
<DwsDataGridColumn Name="DataGridDemoInlineGrid_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Searchable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoInlineGrid_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Searchable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoInlineGrid_Column_CreatedAt" T="ExampleDataElement" Field="CreatedAt" Title="Created" Sortable="true" Searchable="true" Alignment="DwsHorizontalAlignment.Center" />
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private List<ExampleDataElement> _elementsForExample3 = ExampleDataElement.GenerateExampleList(500);Your own empty state
When the grid has no rows, EmptyStateContent is shown in place of the default text.
| Name | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no records to show yet. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Show Code
DataGrid.razor
<DwsDataGrid Name="DataGridDemo_EmptyGrid" T="ExampleDataElement" Items="@_elementsForExampleEmpty" Title="Grid without any rows">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoEmptyGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" />
</DwsDataGridColumns>
<EmptyStateContent>
<div class="d-flex justify-content-center align-items-center py-4">
<DwsIcon Name="DataGridDemoEmptyGrid_EmptyIcon" Icon="@Icons.BS.InboxFill" Class="me-2" Size="DwsSize.Medium" />
<span>There are no records to show yet.</span>
</div>
</EmptyStateContent>
</DwsDataGrid>DataGrid.razor.cs
private readonly List<ExampleDataElement> _elementsForExampleEmpty = new();Fixed maximum height
MaxHeight caps the height of the grid in px; the header stays in place while the rows scroll beneath it.
| Active | Name | Description | Data | Type |
|---|---|---|---|---|
| dqlzfytzuz | kcmdzdpppcrvtibureswajzgwbkhwivkyqxkpqkv | 6 | Standard | |
| hiwdykhphy | yacfhxththggwdkqeauwcoyhzoegilbgczrwhjim | 6.285714 | Complex | |
| maltsiggvl | wjcvgssmzhgaexmoiurhtrwtvzdloaeukrdhtmdq | 6.571429 | Standard | |
| ylvngdzmoo | rfnjagphxzdlpnuevwqbodflvjdpelasfwzxtklx | 6.857143 | Complex | |
| hmwitcidvn | zoacnrcaclykgtowkkktbbkseimvwcdxxswkxrwu | 7.142857 | Standard | |
| nxgduwrxsb | lyehxfehezibnnwdysopzbscegcjbzlfevgygqtr | 7.428571 | Complex | |
| ymjsgrxyjd | cjgbdrdufeodwrhywizwzlgherxjdkbnvbswsfnc | 7.714286 | Standard | |
| vuprliupzm | drdyxlttrvdbhvzkfrvwiedpljbfyupmnixbtuib | 8 | Complex | |
| nunusacdud | dznnmnjovwgrnyxxqljtnoarbrwhmxrmrkfynfiu | 8.285714 | Standard | |
| fwhoxujrta | qpzwmvrccxeuzctzklcpbsptlfjhkrnasqupzrtn | 8.571428 | Complex | |
| clxeuykype | zxafkhljskjeciiezsspmlanqahenlgpknrxothm | 8.857142 | Standard | |
| rxjpwqysgz | sownpjzgwgdutpqlpgkfntntvsrsixnojlucabex | 9.142858 | Complex | |
| dxeuylarha | lybdrwsgyzspliuokncntswvpyowuwwvgiavbwkh | 9.428572 | Standard | |
| zolwzjanpu | htbfoshvmbdwiciymoduinvzwbnsxkwigmbhuvir | 9.714286 | Complex | |
| ucfiobxmjv | ltxcjnfpycfuqvbbergmuauzfuveevnjykbhjrlu | 10 | Standard | |
| qzlkgmxfgx | alzxwprakdovvfttrmflakqdjgilxryhdbjqhlvw | 10.285714 | Complex | |
| budfqmvlzu | wquwoqggctfhsuwdmfqjipkjbpccvkwmiietvlxf | 10.571428 | Standard | |
| bucjjmapuq | mhgluyndlrxsyjqchailtlheignttikgsswxnkry | 10.857142 | Complex | |
| iiwssgfagi | wazbcnlukchqzgmtpwjjuharvzkubmdjzkvwxlid | 11.142858 | Standard | |
| hsjpgzriqx | npahgdcrsxzyqpkqvdogwxfrjcqvnbvvscwgwqfe | 11.428572 | Complex | |
| jjcueqdntk | aqjixdnhdrcefoseufyjfasbhaavqxyibhbgwnsc | 11.714286 | Standard | |
| bedocawxpj | faxhaxcrrgsucxmlhhnvrmjfadwmtqbasscbipmu | 12 | Complex | |
| uhcgbqspkt | rtqshxbpybfsbkvldsusvrkylsbqlcxlqzajkqho | 12.285714 | Standard | |
| fcgrkqnaur | yaisgowlevdtccjmamkgzlpksjmjfvpxryaabsjt | 12.571428 | Complex | |
| wmzdhypapn | snlxzxcnfjfgbdbjlhdrpqehogjjchfphdfnpesl | 12.857142 | Standard | |
| bpkwbynhxy | ybidisotkydqzxyntgprakohgywnhetxrifdfmvz | 13.142858 | Complex | |
| tlqmxoegsg | yonaxkwbmgegyrsuihlptcqkouikpszneljrqepl | 13.428572 | Standard | |
| znnztdfwud | mvxdmcbmltgqbmhbeesamwrdkbhjqlndtbyoumrm | 13.714286 | Complex | |
| gilasszbet | rpetslusvzfdxaoshrmfrvlzxbphqymmyzkijatg | 14 | Standard | |
| mcllmzkhoz | cwefvrvnbxmteypfigxfnaaamuqevrnfxzwoeefc | 14.285714 | Complex | |
| ytymvgqekj | mcvdtbaqskkhvebbaebvuildbswdjoaiunnusble | 14.571428 | Standard | |
| mqxuktgmdo | pdqsbafxhejcmhqhjzsxtzvgqlvbsqhofgykdzzl | 14.857142 | Complex | |
| vkdpddjhtg | vpijbqederwvwgjgdkzhxpmnlghfypgauzkjbtxj | 15.142858 | Standard | |
| mznxgwzzhm | ifdvxvjyepkvaxvzejmqabqpbmtjzbpgsiqfggwc | 15.428572 | Complex | |
| lqypbgspnr | mgonulczzczedsgqtxnkpskgekndisjatavkqtmk | 15.714286 | Standard | |
| khmgilnubd | buviijyyqgszkcxwzaldkojvwwyhuwfpyqyboikd | 16 | Complex | |
| vkwkjmlmiy | smlallkrdtadbudvhrqhrifgzmaoyhltgzxmqowy | 16.285715 | Standard | |
| bsjbgnfuwb | hkheazlwsvihwbxresurovloehcyhkbqwfrnelox | 16.571428 | Complex | |
| huwhepinae | mlysaswmpiuskqjkntdwettjhkluusboqstgollw | 16.857143 | Standard | |
| hpjfxtbpkd | ztrplphbrxgfcsxdvbhgvdnabsafxaqmdmsaoyav | 17.142857 | Complex | |
| nbnqiuxaid | iwfrnsobeqgucpawpxblswuemafkxcdqdzewuwkh | 17.428572 | Standard | |
| ctzxqleayx | llbbenneebnqqcldcsmtefbbbtaiulxcrgosusrx | 17.714285 | Complex | |
| flcwlmimoe | tgkzalnfksdlzjotjjapzbxiwqrewhdlnmnihusg | 18 | Standard | |
| ptmsirdzlz | fribdjtiicprxmwgmoruekjitcdyveedaohwzfri | 18.285715 | Complex | |
| zxwzwbfohq | uuiaiafvnexlrifahgwihdetivfecuyqwjumnzxq | 18.571428 | Standard | |
| snfotwuzrz | jqqornvbssghphosmhjgfqpcbvprkgzyyxadwyhj | 18.857143 | Complex | |
| vkxyabjmql | ttannvxdqmshjshkwnazkerugqxrrjwnimehdikl | 19.142857 | Standard | |
| cobfqpewmr | aobghxyflgqfywoahncomstfrsosbbeaarlpfwbn | 19.428572 | Complex | |
| vwperqirty | eivwooigejcqehkyuklpafmpjuckaktngcmdujhm | 19.714285 | Standard | |
| cfshtsvyfe | xzwfmumyftqojbugekczkscpndcuqiouibfnhown | 20 | Complex | |
| gnwqmmnlvg | uexgsjrrhwevghwhzqopzdqsizhmhdvdzbhbqavn | 20.285715 | Standard | |
| fkgoufnxwg | gqoeysbfjebaweavryuatqejmxttrcpyhsvqmlcc | 20.571428 | Complex |
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_BaseGridSizeHeight" T="ExampleDataElement" Items="@_elementsForExample2" Title="Large Table" MaxHeight="500" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="52">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeHeight_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" Hidden="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeHeight_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoBaseGridSizeHeight_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeHeight_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeHeight_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" Sortable="true" VisibilityBreakpoint="DwsVisibilityBreakpoint.XL" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeHeight_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeHeight_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeHeight_Column_Delete" T="ExampleDataElement">
<CellTemplate>
<DwsButton Name="@($"DataGridDemBaseGridSizeHeight_Delete_{context.Item.ID}")" Appearance="DwsAppearance.Icon" ButtonSize="DwsSize.Medium" Icon="@Icons.BS.Trash" Tooltip="Delete" OnClick="@(() => ButtonAction(@context.Item))" />
</CellTemplate>
</DwsDataGridColumn>
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample2 = ExampleDataElement.GenerateExampleList(330);
private void ButtonAction(ExampleDataElement item)
{
SnackbarNotification.ShowSnackbar(item.Name, DwsSnackbarLevel.Info, "ButtonAction");
}
private DwsContextMenu? _rowMenu;
private static string RowMenuButtonId(ExampleDataElement item) => $"datagrid-demo-rowmenu-{item.ID}";
private List<DwsContextMenuItem> RowMenuItems =>
[
new() { Text = "Edit content", Icon = Icons.BS.Pencil },
new() { Text = "Edit general settings", Icon = Icons.BS.Gear },
DwsContextMenuItem.Separator(),
new() { Text = "Delete", Icon = Icons.BS.Trash, Color = DwsColor.Error },
];
// TargetData is the row's ID, handed over by ShowAtElementAsync.
private void RowMenuItemClick(DwsContextMenuItemClickEventArgs args) =>
SnackbarNotification.ShowSnackbar($"{args.Item.Text}: #{args.TargetData}", DwsSnackbarLevel.Info, "RowMenu");Fixed maximum width
MaxWidth caps the width of the grid in px, and the table scrolls sideways.
| Active | Name | Description | Data | Type |
|---|---|---|---|---|
| dqlzfytzuz | kcmdzdpppcrvtibureswajzgwbkhwivkyqxkpqkv | 6 | Standard | |
| hiwdykhphy | yacfhxththggwdkqeauwcoyhzoegilbgczrwhjim | 6.285714 | Complex | |
| maltsiggvl | wjcvgssmzhgaexmoiurhtrwtvzdloaeukrdhtmdq | 6.571429 | Standard | |
| ylvngdzmoo | rfnjagphxzdlpnuevwqbodflvjdpelasfwzxtklx | 6.857143 | Complex | |
| hmwitcidvn | zoacnrcaclykgtowkkktbbkseimvwcdxxswkxrwu | 7.142857 | Standard | |
| nxgduwrxsb | lyehxfehezibnnwdysopzbscegcjbzlfevgygqtr | 7.428571 | Complex | |
| ymjsgrxyjd | cjgbdrdufeodwrhywizwzlgherxjdkbnvbswsfnc | 7.714286 | Standard | |
| vuprliupzm | drdyxlttrvdbhvzkfrvwiedpljbfyupmnixbtuib | 8 | Complex | |
| nunusacdud | dznnmnjovwgrnyxxqljtnoarbrwhmxrmrkfynfiu | 8.285714 | Standard | |
| fwhoxujrta | qpzwmvrccxeuzctzklcpbsptlfjhkrnasqupzrtn | 8.571428 | Complex | |
| clxeuykype | zxafkhljskjeciiezsspmlanqahenlgpknrxothm | 8.857142 | Standard | |
| rxjpwqysgz | sownpjzgwgdutpqlpgkfntntvsrsixnojlucabex | 9.142858 | Complex | |
| dxeuylarha | lybdrwsgyzspliuokncntswvpyowuwwvgiavbwkh | 9.428572 | Standard | |
| zolwzjanpu | htbfoshvmbdwiciymoduinvzwbnsxkwigmbhuvir | 9.714286 | Complex | |
| ucfiobxmjv | ltxcjnfpycfuqvbbergmuauzfuveevnjykbhjrlu | 10 | Standard | |
| qzlkgmxfgx | alzxwprakdovvfttrmflakqdjgilxryhdbjqhlvw | 10.285714 | Complex | |
| budfqmvlzu | wquwoqggctfhsuwdmfqjipkjbpccvkwmiietvlxf | 10.571428 | Standard | |
| bucjjmapuq | mhgluyndlrxsyjqchailtlheignttikgsswxnkry | 10.857142 | Complex | |
| iiwssgfagi | wazbcnlukchqzgmtpwjjuharvzkubmdjzkvwxlid | 11.142858 | Standard | |
| hsjpgzriqx | npahgdcrsxzyqpkqvdogwxfrjcqvnbvvscwgwqfe | 11.428572 | Complex | |
| jjcueqdntk | aqjixdnhdrcefoseufyjfasbhaavqxyibhbgwnsc | 11.714286 | Standard | |
| bedocawxpj | faxhaxcrrgsucxmlhhnvrmjfadwmtqbasscbipmu | 12 | Complex | |
| uhcgbqspkt | rtqshxbpybfsbkvldsusvrkylsbqlcxlqzajkqho | 12.285714 | Standard | |
| fcgrkqnaur | yaisgowlevdtccjmamkgzlpksjmjfvpxryaabsjt | 12.571428 | Complex | |
| wmzdhypapn | snlxzxcnfjfgbdbjlhdrpqehogjjchfphdfnpesl | 12.857142 | Standard | |
| bpkwbynhxy | ybidisotkydqzxyntgprakohgywnhetxrifdfmvz | 13.142858 | Complex | |
| tlqmxoegsg | yonaxkwbmgegyrsuihlptcqkouikpszneljrqepl | 13.428572 | Standard | |
| znnztdfwud | mvxdmcbmltgqbmhbeesamwrdkbhjqlndtbyoumrm | 13.714286 | Complex | |
| gilasszbet | rpetslusvzfdxaoshrmfrvlzxbphqymmyzkijatg | 14 | Standard | |
| mcllmzkhoz | cwefvrvnbxmteypfigxfnaaamuqevrnfxzwoeefc | 14.285714 | Complex | |
| ytymvgqekj | mcvdtbaqskkhvebbaebvuildbswdjoaiunnusble | 14.571428 | Standard | |
| mqxuktgmdo | pdqsbafxhejcmhqhjzsxtzvgqlvbsqhofgykdzzl | 14.857142 | Complex | |
| vkdpddjhtg | vpijbqederwvwgjgdkzhxpmnlghfypgauzkjbtxj | 15.142858 | Standard | |
| mznxgwzzhm | ifdvxvjyepkvaxvzejmqabqpbmtjzbpgsiqfggwc | 15.428572 | Complex | |
| lqypbgspnr | mgonulczzczedsgqtxnkpskgekndisjatavkqtmk | 15.714286 | Standard | |
| khmgilnubd | buviijyyqgszkcxwzaldkojvwwyhuwfpyqyboikd | 16 | Complex | |
| vkwkjmlmiy | smlallkrdtadbudvhrqhrifgzmaoyhltgzxmqowy | 16.285715 | Standard | |
| bsjbgnfuwb | hkheazlwsvihwbxresurovloehcyhkbqwfrnelox | 16.571428 | Complex | |
| huwhepinae | mlysaswmpiuskqjkntdwettjhkluusboqstgollw | 16.857143 | Standard | |
| hpjfxtbpkd | ztrplphbrxgfcsxdvbhgvdnabsafxaqmdmsaoyav | 17.142857 | Complex | |
| nbnqiuxaid | iwfrnsobeqgucpawpxblswuemafkxcdqdzewuwkh | 17.428572 | Standard | |
| ctzxqleayx | llbbenneebnqqcldcsmtefbbbtaiulxcrgosusrx | 17.714285 | Complex | |
| flcwlmimoe | tgkzalnfksdlzjotjjapzbxiwqrewhdlnmnihusg | 18 | Standard | |
| ptmsirdzlz | fribdjtiicprxmwgmoruekjitcdyveedaohwzfri | 18.285715 | Complex | |
| zxwzwbfohq | uuiaiafvnexlrifahgwihdetivfecuyqwjumnzxq | 18.571428 | Standard | |
| snfotwuzrz | jqqornvbssghphosmhjgfqpcbvprkgzyyxadwyhj | 18.857143 | Complex | |
| vkxyabjmql | ttannvxdqmshjshkwnazkerugqxrrjwnimehdikl | 19.142857 | Standard | |
| cobfqpewmr | aobghxyflgqfywoahncomstfrsosbbeaarlpfwbn | 19.428572 | Complex | |
| vwperqirty | eivwooigejcqehkyuklpafmpjuckaktngcmdujhm | 19.714285 | Standard | |
| cfshtsvyfe | xzwfmumyftqojbugekczkscpndcuqiouibfnhown | 20 | Complex | |
| gnwqmmnlvg | uexgsjrrhwevghwhzqopzdqsizhmhdvdzbhbqavn | 20.285715 | Standard | |
| fkgoufnxwg | gqoeysbfjebaweavryuatqejmxttrcpyhsvqmlcc | 20.571428 | Complex |
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_BaseGridSizeWidth1" T="ExampleDataElement" Items="@_elementsForExample2" Title="Large Table" MaxWidth="450" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="52">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeWidth1_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" Hidden="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeWidth1_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoBaseGridSizeWidth1_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeWidth1_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeWidth1_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" Sortable="true" VisibilityBreakpoint="DwsVisibilityBreakpoint.XL" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeWidth1_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeWidth1_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeWidth1_Column_Delete" T="ExampleDataElement">
<CellTemplate>
<DwsButton Name="@($"DataGridDemBaseGridSizeWidth1_Delete_{context.Item.ID}")" Appearance="DwsAppearance.Icon" ButtonSize="DwsSize.Medium" Icon="@Icons.BS.Trash" Tooltip="Delete" OnClick="@(() => ButtonAction(@context.Item))" />
</CellTemplate>
</DwsDataGridColumn>
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample2 = ExampleDataElement.GenerateExampleList(330);
private void ButtonAction(ExampleDataElement item)
{
SnackbarNotification.ShowSnackbar(item.Name, DwsSnackbarLevel.Info, "ButtonAction");
}
private DwsContextMenu? _rowMenu;
private static string RowMenuButtonId(ExampleDataElement item) => $"datagrid-demo-rowmenu-{item.ID}";
private List<DwsContextMenuItem> RowMenuItems =>
[
new() { Text = "Edit content", Icon = Icons.BS.Pencil },
new() { Text = "Edit general settings", Icon = Icons.BS.Gear },
DwsContextMenuItem.Separator(),
new() { Text = "Delete", Icon = Icons.BS.Trash, Color = DwsColor.Error },
];
// TargetData is the row's ID, handed over by ShowAtElementAsync.
private void RowMenuItemClick(DwsContextMenuItemClickEventArgs args) =>
SnackbarNotification.ShowSnackbar($"{args.Item.Text}: #{args.TargetData}", DwsSnackbarLevel.Info, "RowMenu");Maximum width and height combined
With both MaxWidth and MaxHeight set, the table scrolls horizontally and vertically.
| Active | Name | Description | Data | Type |
|---|---|---|---|---|
| dqlzfytzuz | kcmdzdpppcrvtibureswajzgwbkhwivkyqxkpqkv | 6 | Standard | |
| hiwdykhphy | yacfhxththggwdkqeauwcoyhzoegilbgczrwhjim | 6.285714 | Complex | |
| maltsiggvl | wjcvgssmzhgaexmoiurhtrwtvzdloaeukrdhtmdq | 6.571429 | Standard | |
| ylvngdzmoo | rfnjagphxzdlpnuevwqbodflvjdpelasfwzxtklx | 6.857143 | Complex | |
| hmwitcidvn | zoacnrcaclykgtowkkktbbkseimvwcdxxswkxrwu | 7.142857 | Standard | |
| nxgduwrxsb | lyehxfehezibnnwdysopzbscegcjbzlfevgygqtr | 7.428571 | Complex | |
| ymjsgrxyjd | cjgbdrdufeodwrhywizwzlgherxjdkbnvbswsfnc | 7.714286 | Standard | |
| vuprliupzm | drdyxlttrvdbhvzkfrvwiedpljbfyupmnixbtuib | 8 | Complex | |
| nunusacdud | dznnmnjovwgrnyxxqljtnoarbrwhmxrmrkfynfiu | 8.285714 | Standard | |
| fwhoxujrta | qpzwmvrccxeuzctzklcpbsptlfjhkrnasqupzrtn | 8.571428 | Complex | |
| clxeuykype | zxafkhljskjeciiezsspmlanqahenlgpknrxothm | 8.857142 | Standard | |
| rxjpwqysgz | sownpjzgwgdutpqlpgkfntntvsrsixnojlucabex | 9.142858 | Complex | |
| dxeuylarha | lybdrwsgyzspliuokncntswvpyowuwwvgiavbwkh | 9.428572 | Standard | |
| zolwzjanpu | htbfoshvmbdwiciymoduinvzwbnsxkwigmbhuvir | 9.714286 | Complex | |
| ucfiobxmjv | ltxcjnfpycfuqvbbergmuauzfuveevnjykbhjrlu | 10 | Standard | |
| qzlkgmxfgx | alzxwprakdovvfttrmflakqdjgilxryhdbjqhlvw | 10.285714 | Complex | |
| budfqmvlzu | wquwoqggctfhsuwdmfqjipkjbpccvkwmiietvlxf | 10.571428 | Standard | |
| bucjjmapuq | mhgluyndlrxsyjqchailtlheignttikgsswxnkry | 10.857142 | Complex | |
| iiwssgfagi | wazbcnlukchqzgmtpwjjuharvzkubmdjzkvwxlid | 11.142858 | Standard | |
| hsjpgzriqx | npahgdcrsxzyqpkqvdogwxfrjcqvnbvvscwgwqfe | 11.428572 | Complex | |
| jjcueqdntk | aqjixdnhdrcefoseufyjfasbhaavqxyibhbgwnsc | 11.714286 | Standard | |
| bedocawxpj | faxhaxcrrgsucxmlhhnvrmjfadwmtqbasscbipmu | 12 | Complex | |
| uhcgbqspkt | rtqshxbpybfsbkvldsusvrkylsbqlcxlqzajkqho | 12.285714 | Standard | |
| fcgrkqnaur | yaisgowlevdtccjmamkgzlpksjmjfvpxryaabsjt | 12.571428 | Complex | |
| wmzdhypapn | snlxzxcnfjfgbdbjlhdrpqehogjjchfphdfnpesl | 12.857142 | Standard | |
| bpkwbynhxy | ybidisotkydqzxyntgprakohgywnhetxrifdfmvz | 13.142858 | Complex | |
| tlqmxoegsg | yonaxkwbmgegyrsuihlptcqkouikpszneljrqepl | 13.428572 | Standard | |
| znnztdfwud | mvxdmcbmltgqbmhbeesamwrdkbhjqlndtbyoumrm | 13.714286 | Complex | |
| gilasszbet | rpetslusvzfdxaoshrmfrvlzxbphqymmyzkijatg | 14 | Standard | |
| mcllmzkhoz | cwefvrvnbxmteypfigxfnaaamuqevrnfxzwoeefc | 14.285714 | Complex | |
| ytymvgqekj | mcvdtbaqskkhvebbaebvuildbswdjoaiunnusble | 14.571428 | Standard | |
| mqxuktgmdo | pdqsbafxhejcmhqhjzsxtzvgqlvbsqhofgykdzzl | 14.857142 | Complex | |
| vkdpddjhtg | vpijbqederwvwgjgdkzhxpmnlghfypgauzkjbtxj | 15.142858 | Standard | |
| mznxgwzzhm | ifdvxvjyepkvaxvzejmqabqpbmtjzbpgsiqfggwc | 15.428572 | Complex | |
| lqypbgspnr | mgonulczzczedsgqtxnkpskgekndisjatavkqtmk | 15.714286 | Standard | |
| khmgilnubd | buviijyyqgszkcxwzaldkojvwwyhuwfpyqyboikd | 16 | Complex | |
| vkwkjmlmiy | smlallkrdtadbudvhrqhrifgzmaoyhltgzxmqowy | 16.285715 | Standard | |
| bsjbgnfuwb | hkheazlwsvihwbxresurovloehcyhkbqwfrnelox | 16.571428 | Complex | |
| huwhepinae | mlysaswmpiuskqjkntdwettjhkluusboqstgollw | 16.857143 | Standard | |
| hpjfxtbpkd | ztrplphbrxgfcsxdvbhgvdnabsafxaqmdmsaoyav | 17.142857 | Complex | |
| nbnqiuxaid | iwfrnsobeqgucpawpxblswuemafkxcdqdzewuwkh | 17.428572 | Standard | |
| ctzxqleayx | llbbenneebnqqcldcsmtefbbbtaiulxcrgosusrx | 17.714285 | Complex | |
| flcwlmimoe | tgkzalnfksdlzjotjjapzbxiwqrewhdlnmnihusg | 18 | Standard | |
| ptmsirdzlz | fribdjtiicprxmwgmoruekjitcdyveedaohwzfri | 18.285715 | Complex | |
| zxwzwbfohq | uuiaiafvnexlrifahgwihdetivfecuyqwjumnzxq | 18.571428 | Standard | |
| snfotwuzrz | jqqornvbssghphosmhjgfqpcbvprkgzyyxadwyhj | 18.857143 | Complex | |
| vkxyabjmql | ttannvxdqmshjshkwnazkerugqxrrjwnimehdikl | 19.142857 | Standard | |
| cobfqpewmr | aobghxyflgqfywoahncomstfrsosbbeaarlpfwbn | 19.428572 | Complex | |
| vwperqirty | eivwooigejcqehkyuklpafmpjuckaktngcmdujhm | 19.714285 | Standard | |
| cfshtsvyfe | xzwfmumyftqojbugekczkscpndcuqiouibfnhown | 20 | Complex | |
| gnwqmmnlvg | uexgsjrrhwevghwhzqopzdqsizhmhdvdzbhbqavn | 20.285715 | Standard | |
| fkgoufnxwg | gqoeysbfjebaweavryuatqejmxttrcpyhsvqmlcc | 20.571428 | Complex |
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_BaseGridSizeBoth" T="ExampleDataElement" Items="@_elementsForExample2" Title="Large Table" MaxWidth="450" MaxHeight="500" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="52">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeBoth_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" Hidden="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeBoth_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoBaseGridSizeBoth_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeBoth_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeBoth_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" Sortable="true" VisibilityBreakpoint="DwsVisibilityBreakpoint.XL" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeBoth_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeBoth_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoBaseGridSizeBoth_Column_Delete" T="ExampleDataElement">
<CellTemplate>
<DwsButton Name="@($"DataGridDemBaseGridSizeBoth_Delete_{context.Item.ID}")" Appearance="DwsAppearance.Icon" ButtonSize="DwsSize.Medium" Icon="@Icons.BS.Trash" Tooltip="Delete" OnClick="@(() => ButtonAction(@context.Item))" />
</CellTemplate>
</DwsDataGridColumn>
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample2 = ExampleDataElement.GenerateExampleList(330);
private void ButtonAction(ExampleDataElement item)
{
SnackbarNotification.ShowSnackbar(item.Name, DwsSnackbarLevel.Info, "ButtonAction");
}
private DwsContextMenu? _rowMenu;
private static string RowMenuButtonId(ExampleDataElement item) => $"datagrid-demo-rowmenu-{item.ID}";
private List<DwsContextMenuItem> RowMenuItems =>
[
new() { Text = "Edit content", Icon = Icons.BS.Pencil },
new() { Text = "Edit general settings", Icon = Icons.BS.Gear },
DwsContextMenuItem.Separator(),
new() { Text = "Delete", Icon = Icons.BS.Trash, Color = DwsColor.Error },
];
// TargetData is the row's ID, handed over by ShowAtElementAsync.
private void RowMenuItemClick(DwsContextMenuItemClickEventArgs args) =>
SnackbarNotification.ShowSnackbar($"{args.Item.Text}: #{args.TargetData}", DwsSnackbarLevel.Info, "RowMenu");Minimum widths and long cell text
MinWidth sets the minimum width of a column in px. By default, text that is too long ends in an ellipsis and appears in full in a tooltip; in the Description column here, DisableTruncate wraps the text instead and DisableTooltip turns the tooltip off.
| Name | Description | Type |
|---|---|---|
| tovmprfzvt | glllcknghfwmwbyisyxprnoortcbhaechwabevkg | Standard |
| ugrunhyhcf | bswwtiimzhbtfaaxexoqnpejtkbhoabxabuiehbb | Complex |
| dabrtpcbsl | smoncigayzfetdfstwvmrxmdgtjkoyxaepjitres | Standard |
| vyhxmawgfg | tualgjywlzbfaeuxzbsdqtgihilmxobruxvpiiku | Complex |
| cqydcpbvnc | paordyylyxyklcifoqqxjrgogrjikimgdrhvbqfm | Standard |
| trfvuxakeq | txtzkmoqbqkshtuneylebbrqvolnnnhbcnyjbbfs | Complex |
| ebklbhsczz | osgcdwaadoiipuvklcssgwuhluezmfufccygdyyj | Standard |
| awlqqqvqkh | trxyqjraoxtdgnvphmeiajtchpjoiwjeuujgifhp | Complex |
| ywpyubijlb | gjyurbzdrrnpildogbepqjbodkalthnastoaioog | Standard |
| rjodugvhew | lxhjqgbojkdmwpxdfsnyzbjkwuwwrnlgwwiqszxh | Complex |
| nfmygqadtg | wjnxmwkexvyxqahhkgugsyvvwrhxqaninqzycuma | Standard |
| pqpmrzftim | nxnsavpnowiqkzaiequukrulfgcvfqutaacbkktr | Complex |
| bzfplivpzo | cwdbmusthxboqjxzxtwdiafmkfankxvfulxfyixz | Standard |
| fmjvslkbtv | fbrqrhtfjkcwuemrapvwfqzqhxwevymulzgvohrq | Complex |
| mjsfjakvfx | qpcajukoklyhkvyrdtyfpmiiexervunqooirsnyw | Standard |
| teyxhrxrxa | heguwlptspyhtvmhypubyxdlpazhkdwvtnhekyrn | Complex |
| yllclasixw | bjaufwmijotcofohwaxhtmykndowwkkoyxmydptv | Standard |
| zvxgoddskq | cpkqhbhqmzdeeqtpehgcguiolrgihsgsehvwnnhr | Complex |
| gvrgnzzwli | jhgwfqvzitslzwvwbrzonvhehpazvitkgwynprhr | Standard |
| lvvulqxhww | uoacopqwdaziecyhhjjisytntmtgnellnjcjnnds | Complex |
| udqsvdinyo | evumibwkiypouvaoutgqgsnrtqwakkwxnzfhpaec | Standard |
| mgivsgjphh | hmhdtsevzxcrbvptztpdupzbenhbidbgqfrszlhm | Complex |
| jvenfzhqzd | mrmfzgldnvwvbvdwtoldguyfsjitwjwkhmszgtma | Standard |
Show Code
DataGrid.razor
<DwsDataGrid Name="DataGridDemo_ColumnTextGrid" T="ExampleDataElement" Items="@_elementsForExample5" Title="Column options" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="23">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoColumnTextGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" MinWidth="220" />
<DwsDataGridColumn Name="DataGridDemoColumnTextGrid_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" MinWidth="320" DisableTruncate="true" DisableTooltip="true" />
<DwsDataGridColumn Name="DataGridDemoColumnTextGrid_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Alignment="DwsHorizontalAlignment.Center" />
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample5 = ExampleDataElement.GenerateExampleList(23);Columns pinned to the edges
In this narrow grid, ID is pinned to the left edge and Type to the right edge, so both remain in view while the rest scrolls horizontally.
| ID | Name | Description | Data | Type |
|---|---|---|---|---|
| 1 | tovmprfzvt | glllcknghfwmwbyisyxprnoortcbhaechwabevkg | 6 | Standard |
| 2 | ugrunhyhcf | bswwtiimzhbtfaaxexoqnpejtkbhoabxabuiehbb | 6.285714 | Complex |
| 3 | dabrtpcbsl | smoncigayzfetdfstwvmrxmdgtjkoyxaepjitres | 6.571429 | Standard |
| 4 | vyhxmawgfg | tualgjywlzbfaeuxzbsdqtgihilmxobruxvpiiku | 6.857143 | Complex |
| 5 | cqydcpbvnc | paordyylyxyklcifoqqxjrgogrjikimgdrhvbqfm | 7.142857 | Standard |
| 6 | trfvuxakeq | txtzkmoqbqkshtuneylebbrqvolnnnhbcnyjbbfs | 7.428571 | Complex |
| 7 | ebklbhsczz | osgcdwaadoiipuvklcssgwuhluezmfufccygdyyj | 7.714286 | Standard |
| 8 | awlqqqvqkh | trxyqjraoxtdgnvphmeiajtchpjoiwjeuujgifhp | 8 | Complex |
| 9 | ywpyubijlb | gjyurbzdrrnpildogbepqjbodkalthnastoaioog | 8.285714 | Standard |
| 10 | rjodugvhew | lxhjqgbojkdmwpxdfsnyzbjkwuwwrnlgwwiqszxh | 8.571428 | Complex |
| 11 | nfmygqadtg | wjnxmwkexvyxqahhkgugsyvvwrhxqaninqzycuma | 8.857142 | Standard |
| 12 | pqpmrzftim | nxnsavpnowiqkzaiequukrulfgcvfqutaacbkktr | 9.142858 | Complex |
| 13 | bzfplivpzo | cwdbmusthxboqjxzxtwdiafmkfankxvfulxfyixz | 9.428572 | Standard |
| 14 | fmjvslkbtv | fbrqrhtfjkcwuemrapvwfqzqhxwevymulzgvohrq | 9.714286 | Complex |
| 15 | mjsfjakvfx | qpcajukoklyhkvyrdtyfpmiiexervunqooirsnyw | 10 | Standard |
| 16 | teyxhrxrxa | heguwlptspyhtvmhypubyxdlpazhkdwvtnhekyrn | 10.285714 | Complex |
| 17 | yllclasixw | bjaufwmijotcofohwaxhtmykndowwkkoyxmydptv | 10.571428 | Standard |
| 18 | zvxgoddskq | cpkqhbhqmzdeeqtpehgcguiolrgihsgsehvwnnhr | 10.857142 | Complex |
| 19 | gvrgnzzwli | jhgwfqvzitslzwvwbrzonvhehpazvitkgwynprhr | 11.142858 | Standard |
| 20 | lvvulqxhww | uoacopqwdaziecyhhjjisytntmtgnellnjcjnnds | 11.428572 | Complex |
| 21 | udqsvdinyo | evumibwkiypouvaoutgqgsnrtqwakkwxnzfhpaec | 11.714286 | Standard |
| 22 | mgivsgjphh | hmhdtsevzxcrbvptztpdupzbenhbidbgqfrszlhm | 12 | Complex |
| 23 | jvenfzhqzd | mrmfzgldnvwvbvdwtoldguyfsjitwjwkhmszgtma | 12.285714 | Standard |
Show Code
DataGrid.razor
<DwsDataGrid Name="DataGridDemo_PinnedColumnsGrid" T="ExampleDataElement" Items="@_elementsForExample5" Title="Pinned Columns" MaxWidth="500" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="23">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoPinnedColumnsGrid_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" MinWidth="80" Pin="DwsColumnPin.Left" />
<DwsDataGridColumn Name="DataGridDemoPinnedColumnsGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" MinWidth="200" />
<DwsDataGridColumn Name="DataGridDemoPinnedColumnsGrid_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" MinWidth="300" />
<DwsDataGridColumn Name="DataGridDemoPinnedColumnsGrid_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" MinWidth="150" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoPinnedColumnsGrid_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" MinWidth="120" Alignment="DwsHorizontalAlignment.Center" Pin="DwsColumnPin.Right" />
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample5 = ExampleDataElement.GenerateExampleList(23);Footer totals per column
A column can show a summary in the footer: here the record count under Name, the sum of Data Int and the average of Data Float.
| Name | Data Int | Data Float |
|---|---|---|
| tovmprfzvt | 7 | 6 |
| ugrunhyhcf | 7 | 6.285714 |
| dabrtpcbsl | 7 | 6.571429 |
| vyhxmawgfg | 8 | 6.857143 |
| cqydcpbvnc | 8 | 7.142857 |
| trfvuxakeq | 8 | 7.428571 |
| ebklbhsczz | 9 | 7.714286 |
| awlqqqvqkh | 9 | 8 |
| ywpyubijlb | 9 | 8.285714 |
| rjodugvhew | 10 | 8.571428 |
| nfmygqadtg | 10 | 8.857142 |
| pqpmrzftim | 10 | 9.142858 |
| bzfplivpzo | 11 | 9.428572 |
| fmjvslkbtv | 11 | 9.714286 |
| mjsfjakvfx | 11 | 10 |
| teyxhrxrxa | 12 | 10.285714 |
| yllclasixw | 12 | 10.571428 |
| zvxgoddskq | 12 | 10.857142 |
| gvrgnzzwli | 13 | 11.142858 |
| lvvulqxhww | 13 | 11.428572 |
| udqsvdinyo | 13 | 11.714286 |
| mgivsgjphh | 14 | 12 |
| jvenfzhqzd | 14 | 12.285714 |
| 23 | 238 | 9.14 |
Show Code
DataGrid.razor
<DwsDataGrid Name="DataGridDemo_ColumnSummaryGrid" T="ExampleDataElement" Items="@_elementsForExample5" Title="Column Summaries" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="23">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoColumnSummaryGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Summary="DwsColumnSummaryType.Count" />
<DwsDataGridColumn Name="DataGridDemoColumnSummaryGrid_Column_Int" T="ExampleDataElement" Field="MyInt" Title="Data Int" Alignment="DwsHorizontalAlignment.Right" Summary="DwsColumnSummaryType.Sum" SummaryFormat="N0" />
<DwsDataGridColumn Name="DataGridDemoColumnSummaryGrid_Column_Float" T="ExampleDataElement" Field="MyFloat" Title="Data Float" Alignment="DwsHorizontalAlignment.Right" Summary="DwsColumnSummaryType.Average" />
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample5 = ExampleDataElement.GenerateExampleList(23);Marking rows with a CSS class
The rows listed by index in HighlightedRowsIndex receive the CSS class named in HighlightedRowsClass, cross_row in this example.
| Active | Name | Description | Data | Type |
|---|---|---|---|---|
| dqlzfytzuz | kcmdzdpppcrvtibureswajzgwbkhwivkyqxkpqkv | 6 | Standard | |
| hiwdykhphy | yacfhxththggwdkqeauwcoyhzoegilbgczrwhjim | 6.285714 | Complex | |
| maltsiggvl | wjcvgssmzhgaexmoiurhtrwtvzdloaeukrdhtmdq | 6.571429 | Standard | |
| ylvngdzmoo | rfnjagphxzdlpnuevwqbodflvjdpelasfwzxtklx | 6.857143 | Complex | |
| hmwitcidvn | zoacnrcaclykgtowkkktbbkseimvwcdxxswkxrwu | 7.142857 | Standard | |
| nxgduwrxsb | lyehxfehezibnnwdysopzbscegcjbzlfevgygqtr | 7.428571 | Complex | |
| ymjsgrxyjd | cjgbdrdufeodwrhywizwzlgherxjdkbnvbswsfnc | 7.714286 | Standard | |
| vuprliupzm | drdyxlttrvdbhvzkfrvwiedpljbfyupmnixbtuib | 8 | Complex | |
| nunusacdud | dznnmnjovwgrnyxxqljtnoarbrwhmxrmrkfynfiu | 8.285714 | Standard | |
| fwhoxujrta | qpzwmvrccxeuzctzklcpbsptlfjhkrnasqupzrtn | 8.571428 | Complex | |
| clxeuykype | zxafkhljskjeciiezsspmlanqahenlgpknrxothm | 8.857142 | Standard | |
| rxjpwqysgz | sownpjzgwgdutpqlpgkfntntvsrsixnojlucabex | 9.142858 | Complex | |
| dxeuylarha | lybdrwsgyzspliuokncntswvpyowuwwvgiavbwkh | 9.428572 | Standard | |
| zolwzjanpu | htbfoshvmbdwiciymoduinvzwbnsxkwigmbhuvir | 9.714286 | Complex | |
| ucfiobxmjv | ltxcjnfpycfuqvbbergmuauzfuveevnjykbhjrlu | 10 | Standard | |
| qzlkgmxfgx | alzxwprakdovvfttrmflakqdjgilxryhdbjqhlvw | 10.285714 | Complex | |
| budfqmvlzu | wquwoqggctfhsuwdmfqjipkjbpccvkwmiietvlxf | 10.571428 | Standard | |
| bucjjmapuq | mhgluyndlrxsyjqchailtlheignttikgsswxnkry | 10.857142 | Complex | |
| iiwssgfagi | wazbcnlukchqzgmtpwjjuharvzkubmdjzkvwxlid | 11.142858 | Standard | |
| hsjpgzriqx | npahgdcrsxzyqpkqvdogwxfrjcqvnbvvscwgwqfe | 11.428572 | Complex | |
| jjcueqdntk | aqjixdnhdrcefoseufyjfasbhaavqxyibhbgwnsc | 11.714286 | Standard | |
| bedocawxpj | faxhaxcrrgsucxmlhhnvrmjfadwmtqbasscbipmu | 12 | Complex | |
| uhcgbqspkt | rtqshxbpybfsbkvldsusvrkylsbqlcxlqzajkqho | 12.285714 | Standard | |
| fcgrkqnaur | yaisgowlevdtccjmamkgzlpksjmjfvpxryaabsjt | 12.571428 | Complex | |
| wmzdhypapn | snlxzxcnfjfgbdbjlhdrpqehogjjchfphdfnpesl | 12.857142 | Standard | |
| bpkwbynhxy | ybidisotkydqzxyntgprakohgywnhetxrifdfmvz | 13.142858 | Complex | |
| tlqmxoegsg | yonaxkwbmgegyrsuihlptcqkouikpszneljrqepl | 13.428572 | Standard | |
| znnztdfwud | mvxdmcbmltgqbmhbeesamwrdkbhjqlndtbyoumrm | 13.714286 | Complex | |
| gilasszbet | rpetslusvzfdxaoshrmfrvlzxbphqymmyzkijatg | 14 | Standard | |
| mcllmzkhoz | cwefvrvnbxmteypfigxfnaaamuqevrnfxzwoeefc | 14.285714 | Complex | |
| ytymvgqekj | mcvdtbaqskkhvebbaebvuildbswdjoaiunnusble | 14.571428 | Standard | |
| mqxuktgmdo | pdqsbafxhejcmhqhjzsxtzvgqlvbsqhofgykdzzl | 14.857142 | Complex | |
| vkdpddjhtg | vpijbqederwvwgjgdkzhxpmnlghfypgauzkjbtxj | 15.142858 | Standard | |
| mznxgwzzhm | ifdvxvjyepkvaxvzejmqabqpbmtjzbpgsiqfggwc | 15.428572 | Complex | |
| lqypbgspnr | mgonulczzczedsgqtxnkpskgekndisjatavkqtmk | 15.714286 | Standard | |
| khmgilnubd | buviijyyqgszkcxwzaldkojvwwyhuwfpyqyboikd | 16 | Complex | |
| vkwkjmlmiy | smlallkrdtadbudvhrqhrifgzmaoyhltgzxmqowy | 16.285715 | Standard | |
| bsjbgnfuwb | hkheazlwsvihwbxresurovloehcyhkbqwfrnelox | 16.571428 | Complex | |
| huwhepinae | mlysaswmpiuskqjkntdwettjhkluusboqstgollw | 16.857143 | Standard | |
| hpjfxtbpkd | ztrplphbrxgfcsxdvbhgvdnabsafxaqmdmsaoyav | 17.142857 | Complex | |
| nbnqiuxaid | iwfrnsobeqgucpawpxblswuemafkxcdqdzewuwkh | 17.428572 | Standard | |
| ctzxqleayx | llbbenneebnqqcldcsmtefbbbtaiulxcrgosusrx | 17.714285 | Complex | |
| flcwlmimoe | tgkzalnfksdlzjotjjapzbxiwqrewhdlnmnihusg | 18 | Standard | |
| ptmsirdzlz | fribdjtiicprxmwgmoruekjitcdyveedaohwzfri | 18.285715 | Complex | |
| zxwzwbfohq | uuiaiafvnexlrifahgwihdetivfecuyqwjumnzxq | 18.571428 | Standard | |
| snfotwuzrz | jqqornvbssghphosmhjgfqpcbvprkgzyyxadwyhj | 18.857143 | Complex | |
| vkxyabjmql | ttannvxdqmshjshkwnazkerugqxrrjwnimehdikl | 19.142857 | Standard | |
| cobfqpewmr | aobghxyflgqfywoahncomstfrsosbbeaarlpfwbn | 19.428572 | Complex | |
| vwperqirty | eivwooigejcqehkyuklpafmpjuckaktngcmdujhm | 19.714285 | Standard | |
| cfshtsvyfe | xzwfmumyftqojbugekczkscpndcuqiouibfnhown | 20 | Complex | |
| gnwqmmnlvg | uexgsjrrhwevghwhzqopzdqsizhmhdvdzbhbqavn | 20.285715 | Standard | |
| fkgoufnxwg | gqoeysbfjebaweavryuatqejmxttrcpyhsvqmlcc | 20.571428 | Complex |
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_BaseGridHightlightRow" T="ExampleDataElement" Items="@_elementsForExample2" Title="Large Table" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="52" HighlightedRowsClass="cross_row" HighlightedRowsIndex="new List<int>{1,5,2,3,4,29}">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" Hidden="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoBaseGridHightlightRow_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" Sortable="true" VisibilityBreakpoint="DwsVisibilityBreakpoint.XL" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow_Column_Delete" T="ExampleDataElement">
<CellTemplate>
<DwsButton Name="@($"DataGridDemBaseGridHightlightRow_Delete_{context.Item.ID}")" Appearance="DwsAppearance.Icon" ButtonSize="DwsSize.Medium" Icon="@Icons.BS.Trash" Tooltip="Delete" OnClick="@(() => ButtonAction(@context.Item))" />
</CellTemplate>
</DwsDataGridColumn>
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample2 = ExampleDataElement.GenerateExampleList(330);
private void ButtonAction(ExampleDataElement item)
{
SnackbarNotification.ShowSnackbar(item.Name, DwsSnackbarLevel.Info, "ButtonAction");
}
private DwsContextMenu? _rowMenu;
private static string RowMenuButtonId(ExampleDataElement item) => $"datagrid-demo-rowmenu-{item.ID}";
private List<DwsContextMenuItem> RowMenuItems =>
[
new() { Text = "Edit content", Icon = Icons.BS.Pencil },
new() { Text = "Edit general settings", Icon = Icons.BS.Gear },
DwsContextMenuItem.Separator(),
new() { Text = "Delete", Icon = Icons.BS.Trash, Color = DwsColor.Error },
];
// TargetData is the row's ID, handed over by ShowAtElementAsync.
private void RowMenuItemClick(DwsContextMenuItemClickEventArgs args) =>
SnackbarNotification.ShowSnackbar($"{args.Item.Text}: #{args.TargetData}", DwsSnackbarLevel.Info, "RowMenu");Marking rows with the warning class
The same row indexes, this time with the class cross_row_warning.
| Active | Name | Description | Data | Type |
|---|---|---|---|---|
| dqlzfytzuz | kcmdzdpppcrvtibureswajzgwbkhwivkyqxkpqkv | 6 | Standard | |
| hiwdykhphy | yacfhxththggwdkqeauwcoyhzoegilbgczrwhjim | 6.285714 | Complex | |
| maltsiggvl | wjcvgssmzhgaexmoiurhtrwtvzdloaeukrdhtmdq | 6.571429 | Standard | |
| ylvngdzmoo | rfnjagphxzdlpnuevwqbodflvjdpelasfwzxtklx | 6.857143 | Complex | |
| hmwitcidvn | zoacnrcaclykgtowkkktbbkseimvwcdxxswkxrwu | 7.142857 | Standard | |
| nxgduwrxsb | lyehxfehezibnnwdysopzbscegcjbzlfevgygqtr | 7.428571 | Complex | |
| ymjsgrxyjd | cjgbdrdufeodwrhywizwzlgherxjdkbnvbswsfnc | 7.714286 | Standard | |
| vuprliupzm | drdyxlttrvdbhvzkfrvwiedpljbfyupmnixbtuib | 8 | Complex | |
| nunusacdud | dznnmnjovwgrnyxxqljtnoarbrwhmxrmrkfynfiu | 8.285714 | Standard | |
| fwhoxujrta | qpzwmvrccxeuzctzklcpbsptlfjhkrnasqupzrtn | 8.571428 | Complex | |
| clxeuykype | zxafkhljskjeciiezsspmlanqahenlgpknrxothm | 8.857142 | Standard | |
| rxjpwqysgz | sownpjzgwgdutpqlpgkfntntvsrsixnojlucabex | 9.142858 | Complex | |
| dxeuylarha | lybdrwsgyzspliuokncntswvpyowuwwvgiavbwkh | 9.428572 | Standard | |
| zolwzjanpu | htbfoshvmbdwiciymoduinvzwbnsxkwigmbhuvir | 9.714286 | Complex | |
| ucfiobxmjv | ltxcjnfpycfuqvbbergmuauzfuveevnjykbhjrlu | 10 | Standard | |
| qzlkgmxfgx | alzxwprakdovvfttrmflakqdjgilxryhdbjqhlvw | 10.285714 | Complex | |
| budfqmvlzu | wquwoqggctfhsuwdmfqjipkjbpccvkwmiietvlxf | 10.571428 | Standard | |
| bucjjmapuq | mhgluyndlrxsyjqchailtlheignttikgsswxnkry | 10.857142 | Complex | |
| iiwssgfagi | wazbcnlukchqzgmtpwjjuharvzkubmdjzkvwxlid | 11.142858 | Standard | |
| hsjpgzriqx | npahgdcrsxzyqpkqvdogwxfrjcqvnbvvscwgwqfe | 11.428572 | Complex | |
| jjcueqdntk | aqjixdnhdrcefoseufyjfasbhaavqxyibhbgwnsc | 11.714286 | Standard | |
| bedocawxpj | faxhaxcrrgsucxmlhhnvrmjfadwmtqbasscbipmu | 12 | Complex | |
| uhcgbqspkt | rtqshxbpybfsbkvldsusvrkylsbqlcxlqzajkqho | 12.285714 | Standard | |
| fcgrkqnaur | yaisgowlevdtccjmamkgzlpksjmjfvpxryaabsjt | 12.571428 | Complex | |
| wmzdhypapn | snlxzxcnfjfgbdbjlhdrpqehogjjchfphdfnpesl | 12.857142 | Standard | |
| bpkwbynhxy | ybidisotkydqzxyntgprakohgywnhetxrifdfmvz | 13.142858 | Complex | |
| tlqmxoegsg | yonaxkwbmgegyrsuihlptcqkouikpszneljrqepl | 13.428572 | Standard | |
| znnztdfwud | mvxdmcbmltgqbmhbeesamwrdkbhjqlndtbyoumrm | 13.714286 | Complex | |
| gilasszbet | rpetslusvzfdxaoshrmfrvlzxbphqymmyzkijatg | 14 | Standard | |
| mcllmzkhoz | cwefvrvnbxmteypfigxfnaaamuqevrnfxzwoeefc | 14.285714 | Complex | |
| ytymvgqekj | mcvdtbaqskkhvebbaebvuildbswdjoaiunnusble | 14.571428 | Standard | |
| mqxuktgmdo | pdqsbafxhejcmhqhjzsxtzvgqlvbsqhofgykdzzl | 14.857142 | Complex | |
| vkdpddjhtg | vpijbqederwvwgjgdkzhxpmnlghfypgauzkjbtxj | 15.142858 | Standard | |
| mznxgwzzhm | ifdvxvjyepkvaxvzejmqabqpbmtjzbpgsiqfggwc | 15.428572 | Complex | |
| lqypbgspnr | mgonulczzczedsgqtxnkpskgekndisjatavkqtmk | 15.714286 | Standard | |
| khmgilnubd | buviijyyqgszkcxwzaldkojvwwyhuwfpyqyboikd | 16 | Complex | |
| vkwkjmlmiy | smlallkrdtadbudvhrqhrifgzmaoyhltgzxmqowy | 16.285715 | Standard | |
| bsjbgnfuwb | hkheazlwsvihwbxresurovloehcyhkbqwfrnelox | 16.571428 | Complex | |
| huwhepinae | mlysaswmpiuskqjkntdwettjhkluusboqstgollw | 16.857143 | Standard | |
| hpjfxtbpkd | ztrplphbrxgfcsxdvbhgvdnabsafxaqmdmsaoyav | 17.142857 | Complex | |
| nbnqiuxaid | iwfrnsobeqgucpawpxblswuemafkxcdqdzewuwkh | 17.428572 | Standard | |
| ctzxqleayx | llbbenneebnqqcldcsmtefbbbtaiulxcrgosusrx | 17.714285 | Complex | |
| flcwlmimoe | tgkzalnfksdlzjotjjapzbxiwqrewhdlnmnihusg | 18 | Standard | |
| ptmsirdzlz | fribdjtiicprxmwgmoruekjitcdyveedaohwzfri | 18.285715 | Complex | |
| zxwzwbfohq | uuiaiafvnexlrifahgwihdetivfecuyqwjumnzxq | 18.571428 | Standard | |
| snfotwuzrz | jqqornvbssghphosmhjgfqpcbvprkgzyyxadwyhj | 18.857143 | Complex | |
| vkxyabjmql | ttannvxdqmshjshkwnazkerugqxrrjwnimehdikl | 19.142857 | Standard | |
| cobfqpewmr | aobghxyflgqfywoahncomstfrsosbbeaarlpfwbn | 19.428572 | Complex | |
| vwperqirty | eivwooigejcqehkyuklpafmpjuckaktngcmdujhm | 19.714285 | Standard | |
| cfshtsvyfe | xzwfmumyftqojbugekczkscpndcuqiouibfnhown | 20 | Complex | |
| gnwqmmnlvg | uexgsjrrhwevghwhzqopzdqsizhmhdvdzbhbqavn | 20.285715 | Standard | |
| fkgoufnxwg | gqoeysbfjebaweavryuatqejmxttrcpyhsvqmlcc | 20.571428 | Complex |
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_BaseGridHightlightRow2" T="ExampleDataElement" Items="@_elementsForExample2" Title="Large Table" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="52" HighlightedRowsClass="cross_row_warning" HighlightedRowsIndex="new List<int>{1,5,2,3,4,29}">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow2_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" Hidden="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow2_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoBaseGridHightlightRow2_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow2_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow2_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" Sortable="true" VisibilityBreakpoint="DwsVisibilityBreakpoint.XL" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow2_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow2_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow2_Column_Delete" T="ExampleDataElement">
<CellTemplate>
<DwsButton Name="@($"DataGridDemBaseGridHightlightRow2_Delete_{context.Item.ID}")" Appearance="DwsAppearance.Icon" ButtonSize="DwsSize.Medium" Icon="@Icons.BS.Trash" Tooltip="Delete" OnClick="@(() => ButtonAction(@context.Item))" />
</CellTemplate>
</DwsDataGridColumn>
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample2 = ExampleDataElement.GenerateExampleList(330);
private void ButtonAction(ExampleDataElement item)
{
SnackbarNotification.ShowSnackbar(item.Name, DwsSnackbarLevel.Info, "ButtonAction");
}
private DwsContextMenu? _rowMenu;
private static string RowMenuButtonId(ExampleDataElement item) => $"datagrid-demo-rowmenu-{item.ID}";
private List<DwsContextMenuItem> RowMenuItems =>
[
new() { Text = "Edit content", Icon = Icons.BS.Pencil },
new() { Text = "Edit general settings", Icon = Icons.BS.Gear },
DwsContextMenuItem.Separator(),
new() { Text = "Delete", Icon = Icons.BS.Trash, Color = DwsColor.Error },
];
// TargetData is the row's ID, handed over by ShowAtElementAsync.
private void RowMenuItemClick(DwsContextMenuItemClickEventArgs args) =>
SnackbarNotification.ShowSnackbar($"{args.Item.Text}: #{args.TargetData}", DwsSnackbarLevel.Info, "RowMenu");Marking rows with an inline style
Instead of a class, HighlightedRowsStyle applies inline CSS to the highlighted rows - in this case struck-through text on a warning background.
| Active | Name | Description | Data | Type |
|---|---|---|---|---|
| dqlzfytzuz | kcmdzdpppcrvtibureswajzgwbkhwivkyqxkpqkv | 6 | Standard | |
| hiwdykhphy | yacfhxththggwdkqeauwcoyhzoegilbgczrwhjim | 6.285714 | Complex | |
| maltsiggvl | wjcvgssmzhgaexmoiurhtrwtvzdloaeukrdhtmdq | 6.571429 | Standard | |
| ylvngdzmoo | rfnjagphxzdlpnuevwqbodflvjdpelasfwzxtklx | 6.857143 | Complex | |
| hmwitcidvn | zoacnrcaclykgtowkkktbbkseimvwcdxxswkxrwu | 7.142857 | Standard | |
| nxgduwrxsb | lyehxfehezibnnwdysopzbscegcjbzlfevgygqtr | 7.428571 | Complex | |
| ymjsgrxyjd | cjgbdrdufeodwrhywizwzlgherxjdkbnvbswsfnc | 7.714286 | Standard | |
| vuprliupzm | drdyxlttrvdbhvzkfrvwiedpljbfyupmnixbtuib | 8 | Complex | |
| nunusacdud | dznnmnjovwgrnyxxqljtnoarbrwhmxrmrkfynfiu | 8.285714 | Standard | |
| fwhoxujrta | qpzwmvrccxeuzctzklcpbsptlfjhkrnasqupzrtn | 8.571428 | Complex | |
| clxeuykype | zxafkhljskjeciiezsspmlanqahenlgpknrxothm | 8.857142 | Standard | |
| rxjpwqysgz | sownpjzgwgdutpqlpgkfntntvsrsixnojlucabex | 9.142858 | Complex | |
| dxeuylarha | lybdrwsgyzspliuokncntswvpyowuwwvgiavbwkh | 9.428572 | Standard | |
| zolwzjanpu | htbfoshvmbdwiciymoduinvzwbnsxkwigmbhuvir | 9.714286 | Complex | |
| ucfiobxmjv | ltxcjnfpycfuqvbbergmuauzfuveevnjykbhjrlu | 10 | Standard | |
| qzlkgmxfgx | alzxwprakdovvfttrmflakqdjgilxryhdbjqhlvw | 10.285714 | Complex | |
| budfqmvlzu | wquwoqggctfhsuwdmfqjipkjbpccvkwmiietvlxf | 10.571428 | Standard | |
| bucjjmapuq | mhgluyndlrxsyjqchailtlheignttikgsswxnkry | 10.857142 | Complex | |
| iiwssgfagi | wazbcnlukchqzgmtpwjjuharvzkubmdjzkvwxlid | 11.142858 | Standard | |
| hsjpgzriqx | npahgdcrsxzyqpkqvdogwxfrjcqvnbvvscwgwqfe | 11.428572 | Complex | |
| jjcueqdntk | aqjixdnhdrcefoseufyjfasbhaavqxyibhbgwnsc | 11.714286 | Standard | |
| bedocawxpj | faxhaxcrrgsucxmlhhnvrmjfadwmtqbasscbipmu | 12 | Complex | |
| uhcgbqspkt | rtqshxbpybfsbkvldsusvrkylsbqlcxlqzajkqho | 12.285714 | Standard | |
| fcgrkqnaur | yaisgowlevdtccjmamkgzlpksjmjfvpxryaabsjt | 12.571428 | Complex | |
| wmzdhypapn | snlxzxcnfjfgbdbjlhdrpqehogjjchfphdfnpesl | 12.857142 | Standard | |
| bpkwbynhxy | ybidisotkydqzxyntgprakohgywnhetxrifdfmvz | 13.142858 | Complex | |
| tlqmxoegsg | yonaxkwbmgegyrsuihlptcqkouikpszneljrqepl | 13.428572 | Standard | |
| znnztdfwud | mvxdmcbmltgqbmhbeesamwrdkbhjqlndtbyoumrm | 13.714286 | Complex | |
| gilasszbet | rpetslusvzfdxaoshrmfrvlzxbphqymmyzkijatg | 14 | Standard | |
| mcllmzkhoz | cwefvrvnbxmteypfigxfnaaamuqevrnfxzwoeefc | 14.285714 | Complex | |
| ytymvgqekj | mcvdtbaqskkhvebbaebvuildbswdjoaiunnusble | 14.571428 | Standard | |
| mqxuktgmdo | pdqsbafxhejcmhqhjzsxtzvgqlvbsqhofgykdzzl | 14.857142 | Complex | |
| vkdpddjhtg | vpijbqederwvwgjgdkzhxpmnlghfypgauzkjbtxj | 15.142858 | Standard | |
| mznxgwzzhm | ifdvxvjyepkvaxvzejmqabqpbmtjzbpgsiqfggwc | 15.428572 | Complex | |
| lqypbgspnr | mgonulczzczedsgqtxnkpskgekndisjatavkqtmk | 15.714286 | Standard | |
| khmgilnubd | buviijyyqgszkcxwzaldkojvwwyhuwfpyqyboikd | 16 | Complex | |
| vkwkjmlmiy | smlallkrdtadbudvhrqhrifgzmaoyhltgzxmqowy | 16.285715 | Standard | |
| bsjbgnfuwb | hkheazlwsvihwbxresurovloehcyhkbqwfrnelox | 16.571428 | Complex | |
| huwhepinae | mlysaswmpiuskqjkntdwettjhkluusboqstgollw | 16.857143 | Standard | |
| hpjfxtbpkd | ztrplphbrxgfcsxdvbhgvdnabsafxaqmdmsaoyav | 17.142857 | Complex | |
| nbnqiuxaid | iwfrnsobeqgucpawpxblswuemafkxcdqdzewuwkh | 17.428572 | Standard | |
| ctzxqleayx | llbbenneebnqqcldcsmtefbbbtaiulxcrgosusrx | 17.714285 | Complex | |
| flcwlmimoe | tgkzalnfksdlzjotjjapzbxiwqrewhdlnmnihusg | 18 | Standard | |
| ptmsirdzlz | fribdjtiicprxmwgmoruekjitcdyveedaohwzfri | 18.285715 | Complex | |
| zxwzwbfohq | uuiaiafvnexlrifahgwihdetivfecuyqwjumnzxq | 18.571428 | Standard | |
| snfotwuzrz | jqqornvbssghphosmhjgfqpcbvprkgzyyxadwyhj | 18.857143 | Complex | |
| vkxyabjmql | ttannvxdqmshjshkwnazkerugqxrrjwnimehdikl | 19.142857 | Standard | |
| cobfqpewmr | aobghxyflgqfywoahncomstfrsosbbeaarlpfwbn | 19.428572 | Complex | |
| vwperqirty | eivwooigejcqehkyuklpafmpjuckaktngcmdujhm | 19.714285 | Standard | |
| cfshtsvyfe | xzwfmumyftqojbugekczkscpndcuqiouibfnhown | 20 | Complex | |
| gnwqmmnlvg | uexgsjrrhwevghwhzqopzdqsizhmhdvdzbhbqavn | 20.285715 | Standard | |
| fkgoufnxwg | gqoeysbfjebaweavryuatqejmxttrcpyhsvqmlcc | 20.571428 | Complex |
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_BaseGridHightlightRow3" T="ExampleDataElement" Items="@_elementsForExample2" Title="Large Table" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="52" HighlightedRowsStyle="text-decoration-line: line-through; background-color: var(--warning) !important; color: var(--status-text) !important;" HighlightedRowsIndex="new List<int>{1,5,2,3,4,29}">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow3_Column_ID" T="ExampleDataElement" Field="ID" Title="ID" Hidden="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow3_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Sortable="true" Alignment="DwsHorizontalAlignment.Center">
<CellTemplate>
<DwsIcon Name="@($"DataGridDemoBaseGridHightlightRow3_Column_ActiveIcon_{context.Item.ID}")" Class="datagrid_i" Icon="@(context.Item.Active ? @Icons.BS.CheckLg: @Icons.BS.Circle)" Color="@(context.Item.Active ? DwsColor.Success: DwsColor.Text)" Size="DwsSize.Medium"></DwsIcon>
</CellTemplate>
</DwsDataGridColumn>
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow3_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow3_Column_Descript" T="ExampleDataElement" Field="Description" Title="Description" Sortable="true" VisibilityBreakpoint="DwsVisibilityBreakpoint.XL" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow3_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow3_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoBaseGridHightlightRow3_Column_Delete" T="ExampleDataElement">
<CellTemplate>
<DwsButton Name="@($"DataGridDemBaseGridHightlightRow3_Delete_{context.Item.ID}")" Appearance="DwsAppearance.Icon" ButtonSize="DwsSize.Medium" Icon="@Icons.BS.Trash" Tooltip="Delete" OnClick="@(() => ButtonAction(@context.Item))" />
</CellTemplate>
</DwsDataGridColumn>
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample2 = ExampleDataElement.GenerateExampleList(330);
private void ButtonAction(ExampleDataElement item)
{
SnackbarNotification.ShowSnackbar(item.Name, DwsSnackbarLevel.Info, "ButtonAction");
}
private DwsContextMenu? _rowMenu;
private static string RowMenuButtonId(ExampleDataElement item) => $"datagrid-demo-rowmenu-{item.ID}";
private List<DwsContextMenuItem> RowMenuItems =>
[
new() { Text = "Edit content", Icon = Icons.BS.Pencil },
new() { Text = "Edit general settings", Icon = Icons.BS.Gear },
DwsContextMenuItem.Separator(),
new() { Text = "Delete", Icon = Icons.BS.Trash, Color = DwsColor.Error },
];
// TargetData is the row's ID, handed over by ShowAtElementAsync.
private void RowMenuItemClick(DwsContextMenuItemClickEventArgs args) =>
SnackbarNotification.ShowSnackbar($"{args.Item.Text}: #{args.TargetData}", DwsSnackbarLevel.Info, "RowMenu");Row style and tooltip per record
RowClass picks a CSS class for each record, so rows can be coloured by their data, and RowTooltip gives every row a tooltip of its own.
| Name | Active | Type |
|---|---|---|
| tovmprfzvt | True | Standard |
| ugrunhyhcf | True | Complex |
| dabrtpcbsl | False | Standard |
| vyhxmawgfg | True | Complex |
| cqydcpbvnc | True | Standard |
| trfvuxakeq | False | Complex |
| ebklbhsczz | True | Standard |
| awlqqqvqkh | True | Complex |
| ywpyubijlb | False | Standard |
| rjodugvhew | True | Complex |
| nfmygqadtg | True | Standard |
| pqpmrzftim | False | Complex |
| bzfplivpzo | True | Standard |
| fmjvslkbtv | True | Complex |
| mjsfjakvfx | False | Standard |
| teyxhrxrxa | True | Complex |
| yllclasixw | True | Standard |
| zvxgoddskq | False | Complex |
| gvrgnzzwli | True | Standard |
| lvvulqxhww | True | Complex |
| udqsvdinyo | False | Standard |
| mgivsgjphh | True | Complex |
| jvenfzhqzd | True | Standard |
Show Code
DataGrid.razor
<DwsDataGrid Name="DataGridDemo_RowFormattingGrid" T="ExampleDataElement" Items="@_elementsForExample5" Title="Row Formatting" RowClass="@RowClassForElement" RowTooltip="@(item => $"Type: {(item.Type)}, Active: {(item.Active)}")" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="23">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoRowFormattingGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" />
<DwsDataGridColumn Name="DataGridDemoRowFormattingGrid_Column_Active" T="ExampleDataElement" Field="Active" Title="Active" Alignment="DwsHorizontalAlignment.Center" />
<DwsDataGridColumn Name="DataGridDemoRowFormattingGrid_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Alignment="DwsHorizontalAlignment.Center" />
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample5 = ExampleDataElement.GenerateExampleList(23);
private string RowClassForElement(ExampleDataElement item) =>
item.Active ? string.Empty : "cross_row_warning";Expandable row details
Given a RowDetailTemplate, the grid adds an expand column, and the details open underneath their row.
| Name | Data | Type | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yttsshklfy | 6 | Standard | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of yttsshklfy:
rhnrzhbfyedhrnrynwidwcigdfifbqemvkeptpdo | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fqbgattndc | 6.285714 | Complex | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of fqbgattndc:
coygnuzwdiaqlhjcfxttoqfubmdcehwritipqmbi | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| noeuxyowtj | 6.571429 | Standard | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of noeuxyowtj:
nljefbrwrwlihsytltvkewoqhmhifgtayygxgmga | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dfgmvdnuai | 6.857143 | Complex | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of dfgmvdnuai:
frwtxstirlckkjlbnynvtmvimcgvmbtyaptpampn | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dsuxauqohe | 7.142857 | Standard | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of dsuxauqohe:
psvngvmyvqrdkupwaajzokmgeuhjuskfrvabumgu | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| xzhahetqei | 7.428571 | Complex | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of xzhahetqei:
qegojmocecfmmptocnupyfwcjemgbqzuajevugdt | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| eknshtbfwp | 7.714286 | Standard | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of eknshtbfwp:
jkieeezhbodlmdkxtwjaiablxzrtyhotykztnqbz | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hsyjikafvv | 8 | Complex | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of hsyjikafvv:
gjjwgfmfjtzknbeqjdukgkclefbilohjxcdqkqjw | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| qwfwfrawkl | 8.285714 | Standard | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of qwfwfrawkl:
pwgxsbeduvlqmlyoftuywrvyvhzectnkymmhjnyh | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| szkuyrlhcm | 8.571428 | Complex | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description of szkuyrlhcm:
pxahbkbzbahasayqesvmfmxbgwxfglhgilwphbln | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Show Code
DataGrid.razor
<DwsDataGrid Name="DataGridDemo_GridWithDetailView" T="ExampleDataElement" Items="@_elementsForExample1" Title="Table Name">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoGridWithDetailView_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoGridWithDetailView_Column_Data" T="ExampleDataElement" Field="MyFloat" Title="Data" Sortable="true" Alignment="DwsHorizontalAlignment.Right" />
<DwsDataGridColumn Name="DataGridDemoGridWithDetailView_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Sortable="true" Alignment="DwsHorizontalAlignment.Center" />
</DwsDataGridColumns>
<RowDetailTemplate>
<DwsPaper Name="DataGridDemoGridWithDetailView_DetailViewPaper" Style="padding:6px;">
<span>Description of @(context.Item.Name):</span>
<p>@context.Item.Description</p>
</DwsPaper>
</RowDetailTemplate>
</DwsDataGrid>DataGrid.razor.cs
private List<ExampleDataElement> _elementsForExample1 = ExampleDataElement.GenerateExampleList(10);Grouping rows by a field
GroupByField splits the rows by the given field into collapsible sections, each headed by a row with the key and the count. Since the group key is the first sort key, the rows of a group stay together across all pages; if the pager cuts a group, the group shows the rows on this page out of the total. Every expand and collapse is reported through OnGroupToggled.
| Name | Type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Complex
11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ugrunhyhcf | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| vyhxmawgfg | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| trfvuxakeq | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| awlqqqvqkh | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rjodugvhew | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pqpmrzftim | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fmjvslkbtv | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| teyxhrxrxa | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zvxgoddskq | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lvvulqxhww | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mgivsgjphh | Complex | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Standard
12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tovmprfzvt | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dabrtpcbsl | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cqydcpbvnc | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ebklbhsczz | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ywpyubijlb | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nfmygqadtg | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bzfplivpzo | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mjsfjakvfx | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| yllclasixw | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gvrgnzzwli | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| udqsvdinyo | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jvenfzhqzd | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Show Code
DataGrid.razor
@inject IDwsSnackbarNotificationService SnackbarNotification
<DwsDataGrid Name="DataGridDemo_GroupingGrid" T="ExampleDataElement" Items="@_elementsForExample5" Title="Grouping" GroupByField="Type" OnGroupToggled="OnGroupToggled" PageSizeOptions="@_pageSizeOptionList" InitialPageSize="23">
<DwsDataGridColumns>
<DwsDataGridColumn Name="DataGridDemoGroupingGrid_Column_Name" T="ExampleDataElement" Field="Name" Title="Name" Sortable="true" />
<DwsDataGridColumn Name="DataGridDemoGroupingGrid_Column_Type" T="ExampleDataElement" Field="Type" Title="Type" Alignment="DwsHorizontalAlignment.Center" />
</DwsDataGridColumns>
</DwsDataGrid>DataGrid.razor.cs
private static readonly List<int> _pageSizeOptionList = new() { 23, 52, 101 };
private List<ExampleDataElement> _elementsForExample5 = ExampleDataElement.GenerateExampleList(23);
private void OnGroupToggled(string groupKey)
{
SnackbarNotification.ShowSnackbar($"Group toggled: {groupKey}", DwsSnackbarLevel.Info, "OnGroupToggled");
}Interface-Description
| Name | Typ | Default | Description |
|---|---|---|---|
| IsProviderMode | bool | false | True while an 'ItemsProvider' is set. |
| TotalItemCount | int | 0 | Rows in the whole result: the provider's TotalCount in server-side mode, otherwise the number of filtered items. Usable from a 'PaginationTemplate'. |
| IsLoadingItems | bool | false | True while a call to 'ItemsProvider' is running (the base IsComponentLoading state). |
| LoadError | Exception? | null | The exception of the last failed 'ItemsProvider' call, null once a call succeeded. |
| Name | Typ | Parameters | Description |
|---|---|---|---|
| ScrollBodyToTopAsync | Task | Scrolls the table body to the first row (only with 'Virtualize' and 'Height'/'MaxHeight', where the body itself scrolls). A page change does this automatically. | |
| BeginCellEditAsync | Task<bool> | T item, string field | Cell mode: opens the editor of the cell of an item in the column known by a field name ('Field' or the member path of 'Property'). false when the cell is not on the current page, not editable, vetoed by 'OnCellEditing', or another cell's invalid value keeps its editor open. |
| CommitCellEditAsync | Task<bool> | Cell mode: validates and commits the open cell editor. false when the value is invalid (the editor stays open). | |
| CancelCellEditAsync | Task | Cell mode: closes the open cell editor and puts the value back. | |
| ClearAllColumnFilters | void | Clears the filter of every column of the filter row ('ShowColumnFilterRow') and goes back to the first page. 'HasColumnFilters' tells whether any is set. | |
| GetLayout | DwsDataGridLayout | The columns' current order, widths and visibility (columns without a 'Field' are left out). Plain data; serializes to JSON. | |
| ApplyLayoutAsync | Task | DwsDataGridLayout? layout | Puts a layout back. Entries for columns that no longer exist are ignored; columns the layout does not know follow after the known ones. Does not raise 'OnLayoutChanged'. |
| ResetLayoutAsync | Task | Goes back to the layout the page declares, removes the one stored by 'PersistLayout' and raises 'OnLayoutChanged'. | |
| AutoFitColumnAsync | Task | string field | Sets a column to the width of its widest content (header or a rendered cell), as a double-click on its resize handle does. Limits: the column's 'MinWidth' (40 px without one) and 1200 px. |
| AutoFitAllColumnsAsync | Task | Fits every visible column to its content. | |
| RefreshAsync | Task | bool resetPage | Asks the data source again: with an 'ItemsProvider' it is called with the current page, page size, sort, search and filters (a call still running is cancelled) and the task completes when the answer - or the error state - is shown. Call it after anything the provider reads changed outside the grid. Without a provider it only re-renders. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Items | IEnumerable<T> | null | The items displayed in the table. |
| HeaderClass | string | string.Empty | CSS class for the table header. |
| FooterClass | string | string.Empty | CSS class for the table footer. |
| Title | string | string.Empty | The title of the table. |
| TitleContent | RenderFragment | default | The title content of the table. |
| DwsDataGridColumns | RenderFragment | default | The columns of the table. |
| Searchable | bool | false | Whether the table is searchable. |
| Selectable | bool | false | Whether the rows of the table are selectable. |
| Deselectable | bool | false | Whether rows can be deselected. |
| MultiSelect | bool | false | Whether multiple selection is allowed. |
| RangeSelection | bool | true | With 'MultiSelect': Shift+click selects every row between the last clicked row (the anchor) and the clicked one, in the order shown; with 'KeyboardNavigation', Shift+Arrow Up / Down extends the selection with the focus. false: Shift is ignored. |
| PersistLayout | bool | false | Keeps the column layout (order, widths, hidden columns) in the browser's localStorage and restores it after the first render. |
| LayoutStorageKey | string? | null | The localStorage key 'PersistLayout' uses. Default: dws-datagrid.{Name}.layout. |
| SingleDetailEntryView | bool | false | 'DetailViewMode' Single: true shows the card only while exactly one row is selected (the context's Item is that row); false shows one card for the whole selection (the context's SelectedItems). |
| DetailViewMode | DwsDetailViewMode | DwsDetailViewMode.None | Detail cards of the selected rows in the footer, rendered from 'DetailCardTemplate': one card per selected row (Multi) or one for the selection (Single). |
| DetailCardTemplate | RenderFragment<DwsCellContext<T>>? | null | The content of a detail card of the selection ('DetailViewMode' Single / Multi). For a detail row under a data row use 'RowDetailTemplate'. |
| SearchOpenByDefault | bool | false | Whether the search bar is open by default. |
| ShowTitle | bool | true | Whether the title is shown. |
| ShowFooter | bool | true | Whether the footer is shown. |
| StickyHead | bool | true | Whether the table header is sticky. |
| StickyFoot | bool | true | Whether the table footer is sticky. With 'Virtualize' and a height, only the pagination bar stays fixed. |
| Width | int? | null | The width of the table. |
| MinWidth | int? | null | The minimum width of the table. |
| MaxWidth | int? | null | The maximum width of the table. |
| Height | int? | null | The height of the table. |
| MaxHeight | int? | null | The maximum height of the table. |
| MinHeight | int? | null | The minimum height of the table. |
| Inline | bool | false | Whether the table is displayed inline. |
| Dense | bool | false | Whether the table is displayed in a compact layout. |
| ShowDensityToggle | bool | false | Offers the row density (comfortable / compact) in the grid's 'More actions' menu. |
| MobileLayout | DwsDataGridMobileLayout | Auto | How rows are laid out on a narrow grid: Auto shows cards below 'CardsBreakpoint' (the grid's own width), Cards always, Scroll never (the table scrolls sideways). In card layout sorting and the column filters move into the filter panel. |
| CardsBreakpoint | int | 576 | The grid width in pixels below which MobileLayout Auto shows cards. |
| ShowLayoutToggle | bool | true | While a MobileLayout Auto grid is narrow, its toolbar offers a switch between the cards and the table, which then scrolls sideways. |
| ItemKey | Func<T, object>? | null | The identity of a row, used as its @key (e.g. item => item.Id). Set it when a column template renders named components per row: a row that shows another item after sorting, filtering or paging gets new components instead of renamed ones, which logged 'Duplicate component namespace'. Without it, rows are matched by position. |
| PreferTableView | bool | false | A narrow MobileLayout Auto grid shows the table (scrolling sideways) instead of cards. Two-way bindable with 'PreferTableViewChanged', so the user's choice can be kept. |
| Virtualize | bool | false | Renders only the visible rows of the current page (plus overscan). Requires 'Height' or 'MaxHeight': the table body then becomes the scroll container, and the header row and pagination bar stay fixed; the summary row, detail views and 'FooterContent' scroll with the rows. Without a height nothing is virtualized: every row of the page is rendered and a warning is logged once. Virtualization works per page - increase 'InitialPageSize' for large lists. |
| ExportPDF | bool | false | Whether the table can be exported as PDF. |
| PageSizeOptions | List<int> | new List<int> { 25, 50, 100 } | Options for the page size. |
| InitialPageSize | int | 25 | The initial page size. |
| PageQueryParameter | string? | null | Link mode for paging: the query parameter (?page=3, 1-based) naming the initial page. Under static SSR the pager is links that set it; without it only the range text is rendered there. |
| SortQueryParameter | string? | null | Link mode for sorting: the query parameter (?sort=Name, ?sort=-Name descending) naming the initial sort. Under static SSR sortable headers are links that cycle it; without it they are plain text there. Only a sortable column's field is taken from the address. |
| SearchQueryParameter | string? | null | Link mode for searching: the prefix of the query parameters (?search-Name=anna), one per searchable column field. Under static SSR the search panel is a GET form that sets them (text, number, date and time fields) and the search raises OnSearch / SearchParametersChanged as typing would, so filter the rows there or in the ItemsProvider; without it there is no search panel there. Interactive, the address only gives the initial search. |
| HighlightedRowsIndex | List<int> | new List<int>() | Indexes of the highlighted rows. |
| HighlightedRowsClass | string | highlight_row | CSS class for highlighted rows. |
| HighlightedRowsStyle | string? | null | CSS style for highlighted rows. |
| Loading | bool | false | Whether the table is loading. |
| CurrentPage | int | 0 | The page shown, 0-based. Two-way bindable (@bind-CurrentPage), e.g. to keep the page in the URL. Without a binding it only takes effect when its value changes, so a parent that re-renders with the same literal does not pull the user back. |
| PageSize | int | InitialPageSize | Rows per page. Two-way bindable (@bind-PageSize); not set (or 0) the grid starts with 'InitialPageSize'. Reading it gives the size in use. Like 'CurrentPage' it only takes effect when its value changes. |
| ItemsProvider | Func<DwsDataGridRequest, CancellationToken, Task<DwsDataGridResult<T>>>? | null | Server-side mode: loads the rows page by page instead of taking them through 'Items'. The grid then pages, sorts, searches and filters nothing itself - every change calls the provider (DwsDataGridRequest: 0-based Page, PageSize, Skip, SortDefinitions, SearchParameters, ColumnFilters, GroupByField) and the pager uses DwsDataGridResult.TotalCount. The token is cancelled when a newer request replaces this one; a late answer is ignored. 'Items' is ignored while a provider is set. In this mode select-all, CSV/JSON/PDF export and grouping work on the loaded page, and column summaries show DwsDataGridResult.Summaries. |
| SearchDebounceMilliseconds | int | 500 | Milliseconds the grid waits after a sidebar search before it raises 'OnSearch', and - with an 'ItemsProvider' - after a search or a keystroke in the column filter row before it asks the provider. A newer entry within that time replaces the pending one; 0 searches at once. |
| LoadErrorContent | RenderFragment<Exception>? | null | Replaces the default message and retry button shown when 'ItemsProvider' failed. Call 'RefreshAsync' to try again. |
| SelectedItems | List<T> | default | The selected items. |
| ActiveSortDefinition | DwsSortDefinition | new DwsSortDefinition() | The active sort definition. |
| SearchParameters | DwsSearchParametersSet? | default | The search parameters. |
| FooterStringForOnePage | string | string.Empty | Optional consumer-side override text for the footer with one page (placeholder '#'). Empty = localized default text. |
| FooterStringForMultiPages | string | string.Empty | Optional consumer-side override text for the footer with multiple pages (placeholders '#'/'*'). Empty = localized default text. |
| PdfAuthor | string | string.Empty | The author written into the metadata of the exported PDF document. |
| LoadingContent | RenderFragment? | null | Optional custom loading indicator instead of the default spinner while 'Loading' is true. |
| EmptyStateContent | RenderFragment? | null | Optional custom content instead of the default empty message when 'Items' is empty. |
| FooterContent | RenderFragment? | null | Optional additional content appended to the default footer (e.g. totals/summaries). |
| ShowRefreshButton | bool | false | Shows a refresh button in the title bar that raises 'OnRefresh'. |
| ShowColumnVisibilityToggle | bool | false | Shows a button for showing/hiding columns. |
| ExportCSV | bool | false | Shows a button that exports the currently filtered/sorted rows as CSV. |
| CsvExportByteOrderMark | bool | true | Starts the CSV file with a UTF-8 byte-order mark, which Excel needs to read umlauts and other non-ASCII letters correctly. |
| CsvExportFormulaGuard | bool | true | Puts a single quote in front of a text value (or column title) that starts with =, +, -, @, a tab or a carriage return, so a spreadsheet shows it as text instead of running it as a formula. Numbers such as -5 from numeric columns are not changed. |
| ExportJSON | bool | false | Shows a button that exports the currently filtered/sorted rows as JSON. |
| ExportFileName | string | export | File name (without extension) for the CSV/JSON export download. |
| MultiColumnSort | bool | false | Enables multi-column sorting: Shift+click on a column header adds it to the active sort instead of replacing it. |
| ActiveSortDefinitions | List<DwsSortDefinition> | new() | The active multi-column sort in priority order. Takes precedence over 'ActiveSortDefinition' as soon as it is not empty. |
| ColumnResizing | bool | false | Shows drag handles on the right edge of each sortable/resizable column header for adjusting the column width (respecting the column's 'MinWidth'). |
| RowClass | Func<T, string>? | null | Optional CSS class computed per row (e.g. conditional formatting based on the record). |
| RowStyle | Func<T, string>? | null | Optional inline CSS style computed per row. |
| RowTooltip | Func<T, string>? | null | Optional tooltip text computed per row (title attribute). |
| ColumnReordering | bool | false | Enables drag & drop on the column headers to reorder columns (see 'DwsDataGridColumn.Reorderable'). |
| KeyboardNavigation | bool | false | Enables roving keyboard navigation between the data cells (arrow keys, Home/End, Page Up/Down) plus ARIA grid/row/gridcell roles and 'aria-sort'. |
| EnableContextMenu | bool | false | Enables the row context menu, a composed DwsContextMenu built from 'ContextMenuItems': right-click, a long press on a touch screen, or the context menu key / Shift+F10 on a focused cell. |
| ContextMenuItems | List<DwsDataGridContextMenuItem<T>> | new() | Entries of the row context menu: Label, Icon, Shortcut (a hint), Color, OnClick(item), IsVisible(item) and IsDisabled(item). (ContextMenuTemplate was removed in 0.1.5: the menu is a DwsContextMenu.) |
| ShowColumnFilterRow | bool | false | Shows a row of per-column quick filter text fields below the table header (can be combined with sorting and search). |
| ShowClearAllFiltersButton | bool | true | While a filter of the filter row ('ShowColumnFilterRow') is set, a line under that row shows the number of filtered columns and a 'Clear all filters' button; after a click the focus is on the first filter field and the result is announced. The line is not there without a filter. False: neither is shown - call ClearAllColumnFilters() from a button of your own. |
| ShowFirstLastPageButtons | bool | true | Shows/hides the 'First page'/'Last page' buttons of the default pagination. |
| ShowPageSizeSelector | bool | true | Shows/hides the page size selector of the default pagination regardless of the record count. |
| PaginationTemplate | RenderFragment<DwsDataGrid<T>>? | null | Replaces the entire default pagination bar; the context is the table itself ('NavigateTo', 'CurrentPage', 'NumPages', ...). |
| GroupByField | string? | null | Groups the rows of the current page by the value (converted to text) of this column field, with collapsible group header rows. |
| DefaultGroupsExpanded | bool | true | Whether groups start expanded or collapsed with 'GroupByField'. |
| EnableRowEditing | bool | false | Enables inline row editing with DataAnnotations validation (see 'DwsDataGridColumn.Editable'/'EditTemplate'). |
| EditMode | DwsDataGridEditMode | DwsDataGridEditMode.Row | Row: whole rows are edited ('EnableRowEditing'). Cell: single cells are edited in place and the cells take the keyboard focus - F2, Enter, a double-click or typing opens the focused cell's editor, Enter commits, Tab / Shift+Tab commit and open the next / previous editable cell, Escape cancels, a click elsewhere commits. The value is validated on commit (the property's DataAnnotations, and that the text is a value of the column's type); while it is invalid the editor stays open with its message. The row's edit buttons and row events are not used in cell mode. |
| DwsDataGridColumn.Property | Expression<Func<T, object?>>? | null | On a column: its value as an expression ('p => p.Price', nested 'p => p.Address.City', or a calculation). Read through a delegate compiled once instead of reflection per cell, for cells, sorting, filtering, grouping, summaries, export and editing (a member path can be written, a calculation cannot). Without 'Field' the column is known by the member path ('Address.City'), a calculation by the column's Name. 'Field' keeps working; it may be a nested path too. |
| RowDetailTemplate | RenderFragment<DwsCellContext<T>>? | null | Content of a collapsible detail row under each row (with a CSS transition). The grid adds the expand column itself; its button carries aria-expanded. |
| RowDetailDisabled | Func<T, bool>? | null | Rows this returns true for cannot be expanded: their expand button is disabled (a row without details). |
| RowKeySelector | Func<T, object>? | null | Computes a stable identity key per row so that, for example, the expanded state of 'RowDetailTemplate' survives replacing 'Items'. |
| EnableRowDragDrop | bool | false | Enables native HTML5 drag & drop on rows (see 'OnRowDragStart'/'OnRowDrop'). |
| DataVersion | int | default | Increment to re-evaluate the table after an external data update without losing sorting/filters/selection. When 'Items' is an 'ObservableCollection<T>', the table also reacts to 'CollectionChanged' automatically. |
| Name | Typ | Description |
|---|---|---|
| ActiveSortDefinitionChanged | EventCallback<DwsSortDefinition> | Raised with the new primary sort when the user changes the sort. |
| ActiveSortDefinitionsChanged | EventCallback<List<DwsSortDefinition>> | Raised with the new sort definitions when the user changes the sort. |
| OnColumnOrderChanged | EventCallback<List<string>> | An event raised with the new field order after a column header is dragged and dropped. |
| OnLayoutChanged | EventCallback<DwsDataGridLayout> | Raised after the user resized, fitted, reordered, showed or hid a column, with the whole layout: Columns in the order shown, each with Field, Width (px, null while never resized) and Hidden. |
| OnGroupToggled | EventCallback<string> | An event raised with the group key when a group header row is expanded or collapsed. |
| OnRowEditing | EventCallback<T> | An event raised when a row enters edit mode. |
| OnRowSaved | EventCallback<T> | An event raised after a row's edits have passed DataAnnotations validation and been applied. |
| OnRowEditCancelled | EventCallback<T> | An event raised when an ongoing row edit is cancelled. |
| OnCellEditing | EventCallback<DwsDataGridCellEditArgs<T>> | Cell mode: raised before a cell's editor opens (Item, Column, Field, OldValue). Set 'Cancel' to keep this cell read-only; Tab then passes it over. |
| OnCellSaved | EventCallback<DwsDataGridCellEditArgs<T>> | Cell mode: raised after a changed value passed validation and was written to the item, with Item, Column, Field, OldValue and NewValue. Not raised when the value did not change. 'OnAuditEntry' is raised as well. |
| OnCellEditCancelled | EventCallback<DwsDataGridCellEditArgs<T>> | Cell mode: raised when a cell edit was cancelled with Escape and the value put back. |
| OnAuditEntry | EventCallback<DwsDataGridAuditEntry<T>> | An event per changed field when a row edit is saved, plus once per row on 'DeleteRowAsync' - it is only a logging event; the table itself stores nothing. |
| OnRowDeleted | EventCallback<T> | An event raised after 'DeleteRowAsync' so the caller can remove the item from its own data source. |
| OnRowDragStart | EventCallback<T> | An event raised when the user starts dragging a row (requires 'EnableRowDragDrop'). |
| OnRowDrop | EventCallback<DwsDataGridRowDropEventArgs<T>> | An event raised when a dragged row is dropped on a row of this table (requires 'EnableRowDragDrop'). |
| OnRowActivate | EventCallback<T> | An event raised when the focused row is activated by keyboard (Enter/Space) while 'KeyboardNavigation' is active. |
| OnSortChanged | EventCallback<List<DwsSortDefinition>> | An event raised when the active (single or multi-column) sort changes. |
| OnRefresh | EventCallback | An event raised when the refresh button is clicked. The table sets 'Loading' meanwhile. With an 'ItemsProvider' the grid then asks the provider again ('RefreshAsync'). |
| CurrentPageChanged | EventCallback<int> | Raised with the new 0-based page when the user (or the grid itself) changes the page. |
| PageSizeChanged | EventCallback<int> | Raised with the new page size when the user picks another one in the footer. |
| DenseChanged | EventCallback<bool> | Raised with the new density when the user picks it in the 'More actions' menu (ShowDensityToggle); use @bind-Dense to keep it. |
| PreferTableViewChanged | EventCallback<bool> | Raised with the new value when the user switches a narrow grid between cards and table; use @bind-PreferTableView to keep it. |
| OnLoadError | EventCallback<Exception> | Raised when 'ItemsProvider' throws. The grid shows its error state with a retry button either way. |
| OnSearch | EventCallback<DwsSearchParametersSet> | An event raised when a search is performed. |
| OnResetSearch | EventCallback | An event raised when the search is reset. |
| OnKeyUp | EventCallback<KeyboardEventArgs> | An event raised when a key is released. |
| OnKeyDown | EventCallback<KeyboardEventArgs> | An event raised when a key is pressed. |
| LoadingChanged | EventCallback<bool> | An event raised when the loading state changes. |
| SearchParametersChanged | EventCallback<DwsSearchParametersSet> | An event raised when the search parameters change. |
| OnDblClickRow | EventCallback<T> | An event raised when a row is double-clicked. |
| OnClickRow | EventCallback<T> | An event raised when a row is clicked. |
| SelectedItemsChanged | EventCallback<List<T>> | An event raised when the selected items change. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Element | ElementReference | The associated web component. May be null if accessed before the component is rendered. | |
| ComponentGuid | Guid | Unique identifier for the component. | |
| TypeString | string | The name of the component type, obtained from reflection. | |
| Authorized_RegisterEnabled | bool | false | Indicates whether this component is enabled through a permission registry. |
| Authorized_RegisterSelected | bool | false | Indicates whether this component is selected in permission selection mode. |
| GetInitializedState | bool | false | Returns whether the component is initialized. |
| GetRenderModeState | DwsRenderMode | Returns the current render mode. | |
| GetComponentState | DwsComponentStateType | Returns the current component state. | |
| GetIsInteractiveState | bool | false | Returns whether the component is interactive. |
| GetIsPrerenderingState | bool | false | Returns whether the component is prerendering. |
| GetComponentLoadingState | bool | false | Returns whether the component is loading. |
| IsFormBusy | bool | false | Whether the DwsForm (or DwsFormBusyRegion) around the component is locked because its submit handler is running. The state itself is the cascaded FormBusyState (IDwsFormBusyState). |
| Name | Typ | Parameters | Description |
|---|---|---|---|
| DebugInfo | void | Logs debug information about the component. | |
| UpdateState | void | Updates the component's state and triggers StateHasChanged. | |
| UpdateStateAsync | Task | Asynchronously updates the component's state and triggers StateHasChanged. | |
| Dispose | void | Disposes the component and releases resources. | |
| FocusAsync | ValueTask | bool containedInScrollableList | Sets focus to the component's element. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Name | string | Required unique identifier for the component within its container. | |
| Visible | bool | true | Determines if the component is visible in the UI. |
| Disabled | bool | false | Disables the form control, ensuring it doesn't participate in form submission. |
| ComponentNameSpace | string | The namespace for permission-based access control. | |
| PermissionKey | string? | null | A stable key that takes the place of Name in the generated permission namespace (Page.PermissionKey): the stored permission survives a rename, and components that share a key share one permission entry. Null: keyed by Name. Read once, when the component registers; an explicit ComponentNameSpace wins. |
| Class | string | Optional CSS class names. | |
| Style | string | Optional in-line styles. | |
| Tag | object | An optional user-defined object to store any additional data with the component. | |
| BackReference | DwsReference | A reference to the enclosing component. | |
| ID | string | The HTML ID attribute for the component. | |
| AdditionalAttributes | Dictionary<string, object> | Additional HTML attributes for the component's root element. | |
| IgnorePermissionChecks | bool | false | Bypasses all permission checks for this component. |
| IgnorePermissionSelection | bool | false | Ignore permission selection mode for this component. |
| IgnoreFormBusy | bool | false | Takes the component out of the submit lock of the DwsForm (or DwsFormBusyRegion) around it: IsFormBusy stays false for it. |
| Name | Typ | Description |
|---|---|---|
| OnInitializedCallbackStarted | EventCallback | Callback when OnInitialized starts. |
| OnInitializedCallback | EventCallback | Callback during OnInitialized. |
| OnInitializedCallbackCompleted | EventCallback | Callback when OnInitialized completes. |
| OnInitializedAsyncCallbackStarted | EventCallback | Callback when OnInitializedAsync starts. |
| OnInitializedAsyncCallback | EventCallback | Callback during OnInitializedAsync. |
| OnInitializedAsyncCallbackCompleted | EventCallback | Callback when OnInitializedAsync completes. |
| OnIsComponentLoadingChanged | EventCallback<bool> | Callback when IsComponentLoading changes. |
| OnCurrentRenderModeChanged | EventCallback<DwsRenderMode> | Callback when CurrentRenderMode changes. |
| OnComponentStateChanged | EventCallback<DwsComponentStateType> | Callback when ComponentState changes. |
