Skip to content

Commit

Permalink
StaticCommand Grid sample updated
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasherceg committed Nov 11, 2023
1 parent 8dcf71f commit fd99266
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,15 @@ public void ProcessLoadedItems<T>(IQueryable<T> filteredQueryable, IList<T> item
.OrderByDescending(c => c.CustomerId)
.FirstOrDefault()?.CustomerId;

NextPageToken = (lastToken ?? 0).ToString();
lastToken ??= 0;
if (lastToken == 12)
{
NextPageToken = null;
}
else
{
NextPageToken = lastToken.ToString();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
<head>
<meta charset="utf-8" />
<title></title>
<style>
.disabled a { color: gray; text-decoration: none; }
</style>
</head>
<body>
<div class="container">
<h1>Standard data set</h1>
<dot:GridView DataSource="{value: StandardDataSet}"
LoadData="{staticCommand: _root.LoadStandard}">
LoadData="{staticCommand: RootViewModel.LoadStandard}">
<Columns>
<dot:GridViewTextColumn HeaderText="Id" ValueBinding="{value: CustomerId}" AllowSorting="True" />
<dot:GridViewTextColumn HeaderText="Name" ValueBinding="{value: Name}" AllowSorting="True" />
Expand All @@ -19,11 +22,10 @@
</Columns>
</dot:GridView>
<dot:DataPager DataSet="{value: StandardDataSet}" LoadData="{staticCommand: RootViewModel.LoadStandard}" />
<%--

<h1>NextToken paging options</h1>
<dot:GridView DataSource="{value: NextTokenDataSet}"
<%--LoadData="{staticCommand: _root.LoadToken}"--%>
>
LoadData="{staticCommand: RootViewModel.LoadToken}">
<Columns>
<dot:GridViewTextColumn HeaderText="Id" ValueBinding="{value: CustomerId}" />
<dot:GridViewTextColumn HeaderText="Name" ValueBinding="{value: Name}" />
Expand All @@ -35,8 +37,7 @@

<h1>NextTokenHistory data set</h1>
<dot:GridView DataSource="{value: NextTokenHistoryDataSet}"
<%--LoadData="{staticCommand: RootViewModel.LoadTokenHistory}"--%>
>
LoadData="{staticCommand: RootViewModel.LoadTokenHistory}">
<Columns>
<dot:GridViewTextColumn HeaderText="Id" ValueBinding="{value: CustomerId}" />
<dot:GridViewTextColumn HeaderText="Name" ValueBinding="{value: Name}" />
Expand All @@ -48,8 +49,7 @@

<h1>MultiSort data set</h1>
<dot:GridView DataSource="{value: MultiSortDataSet}"
<%--LoadData="{staticCommand: RootViewModel.LoadMultiSort}"--%>
>
LoadData="{staticCommand: RootViewModel.LoadMultiSort}">
<Columns>
<dot:GridViewTextColumn HeaderText="Id" ValueBinding="{value: CustomerId}" AllowSorting="True" />
<dot:GridViewTextColumn HeaderText="Name" ValueBinding="{value: Name}" AllowSorting="True" />
Expand All @@ -58,7 +58,7 @@
</Columns>
</dot:GridView>
<dot:DataPager DataSet="{value: MultiSortDataSet}" LoadData="{staticCommand: RootViewModel.LoadMultiSort}" />
--%>

</div>
</body>
</html>

0 comments on commit fd99266

Please sign in to comment.