Telerik.Web.UI.RadGrid 没有 public 属性 命名的 GroupByExpressions

Telerik.Web.UI.RadGrid does not have a public property named GroupByExpressions

我正在学习 ASP.NET 和 C#,使用 DNN。

我实际上是想显示一个列表,并将所有元素按一个分组。

因为我不知道如何去做,所以我尝试遵循 the Telerik tutorial

但是我有一个错误,告诉我

Telerik.Web.UI.RadGrid does not have a public property named GroupByExpressions

我也一样
GridGroupByExpression, SelectFields, GridGroupByFields, groupByFields, and few others

也在 Telerik Doc about grouping 上搜索过,但没有找到任何有用的东西,至少可以理解为什么。

我也向 Telerik Doc 检查了这些元素,当然,they exist

如有任何帮助,我们将不胜感激。 谢谢

这是我的代码

<rad:RadPageView runat="server" ID="RadPageView3">
    <h2>Here my futur awesome work</h2>
    <asp:UpdatePanel runat="server" ID="UpdatePanel1" ChildrenAsTriggers="True" UpdateMode="Conditional">
        <ContentTemplate>
            <rad:RadGrid runat="server" ID="grdCustomer" AutoGenerateColumns="False" GridLines="None" CssClass="dnnRadGrid mgCustomersGrid"
                AllowPaging="true" AllowCustomPaging="true" PageSize="50"  AllowSorting="true" AllowFilteringByColumn="True"
                EnableLinqExpressions="False" OnNeedDataSource="GrdCustomerOnNeedDataSource">
                <GroupingSettings CaseSensitive="false" />
                <ClientSettings AllowDragToGroup="True"/>
                <GroupByExpressions>
                    <rad:GridGroupByExpression>
                        <SelectFields>
                            <rad:GridGroupByField FieldAlias="EndUserCompany" FieldName="EndUserCompany"></rad:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <rad:GridGroupByField FieldName="EndUserCompany" SortOrder="Ascending"></rad:GridGroupByField>
                        </GroupByFields>
                    </rad:GridGroupByExpression>
                </GroupByExpressions>
                <MasterTableView DataKeyNames="EndUserCompany">
                    <Columns>
                        <rad:GridBoundColumn HeaderText="NumLicense" DataField="NumLicense" 
                            FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
                        <rad:GridBoundColumn HeaderText="StatusLicense" DataField="StatusLicense" 
                            FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
                        <rad:GridBoundColumn HeaderText="NameProduct" DataField="NameProduct" 
                            FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
                        <rad:GridTemplateColumn HeaderText="ActiveMaintenance" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50" ItemStyle-HorizontalAlign="Center" AllowFiltering="False">
                            <ItemTemplate>
                                <dnn:DnnImage Runat="server" ID="activeMaintenance" IconKey="Checked" Visible="False" />
                                <dnn:DnnImage Runat="server" ID="noActiveMaintenance" IconKey="Unchecked" Visible="False" />
                            </ItemTemplate>
                        </rad:GridTemplateColumn>
                        <rad:GridBoundColumn HeaderText="EndUserCompany" DataField="EndUserCompany" 
                            FilterControlWidth="99%" ShowFilterIcon="False" AutoPostBackOnFilter="True" />
                    </Columns>
                </MasterTableView>
                <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
                    <Selecting AllowRowSelect="True"></Selecting>
                    <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
                        ResizeGridOnColumnResize="False"></Resizing>
                </ClientSettings>
                <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>

            </rad:RadGrid>
            <input type="hidden" id="hidCookie" runat="Server" /> 
        </ContentTemplate>
    </asp:UpdatePanel>
</rad:RadPageView>

GroupByExpressions 元素是否必须是 MasterTableView 元素的子元素?

参考:http://www.telerik.com/help/aspnet-ajax/grid-group-by-declarative-definition.html