Skip to content

Commit

Permalink
Merge pull request #920 from IgniteUI/mdd-add-custom-content-grid-too…
Browse files Browse the repository at this point in the history
…lbar

mdd-add-custom-content-grid-toolbar
  • Loading branch information
HUSSAR-mtrela authored Jan 9, 2025
2 parents acb40e4 + 99f22ce commit 09980df
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
24 changes: 16 additions & 8 deletions samples/grids/grid/toolbar-sample-4/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,56 @@
>
<IgbGridToolbarActions
>

<IgbButton onclick="clearSort()">Clear Sort</IgbButton>

<IgbGridToolbarHiding
>
</IgbGridToolbarHiding>

<IgbGridToolbarPinning
>
</IgbGridToolbarPinning>

</IgbGridToolbarActions>

</IgbGridToolbar>

<IgbColumn
Field="Name"
Header="Athlete"
Width="200px">
Width="200px"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="CountryName"
Header="Country"
Width="200px">
Width="200px"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="BeatsPerMinute"
Header="Beats Per Minute">
Header="Beats Per Minute"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="TopSpeed"
Header="Top Speed">
Header="Top Speed"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="AthleteNumber"
Header="ID">
Header="ID"
Sortable="true">
</IgbColumn>

<IgbColumn
Field="TrackProgress"
Header="Progress">
Header="Progress"
Sortable="true">
</IgbColumn>

</IgbGrid>
Expand All @@ -69,7 +77,7 @@
}

private IgbGrid grid1;

private PlayersData _PlayersData = null;
public PlayersData PlayersData
{
Expand Down
3 changes: 2 additions & 1 deletion samples/grids/grid/toolbar-sample-4/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public static async Task Main(string[] args)
// registering Ignite UI modules
builder.Services.AddIgniteUIBlazor(
typeof(IgbInputModule),
typeof(IgbGridModule)
typeof(IgbGridModule),
typeof(IgbButtonModule)
);
await builder.Build().RunAsync();
}
Expand Down
5 changes: 5 additions & 0 deletions samples/grids/grid/toolbar-sample-4/wwwroot/events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function clearSort() {
const grid = document.getElementsByTagName("igc-grid")[0];

grid.clearSort("");
}
1 change: 1 addition & 0 deletions samples/grids/grid/toolbar-sample-4/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<!-- importing blazor bundle for IG controls: -->
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
<script src="_framework/blazor.webassembly.js"></script>
<script src="events.js"></script>
</body>

</html>

0 comments on commit 09980df

Please sign in to comment.