This is a migrated thread and some comments may be shown as answers.

"Unknown server tag" with inherited GridBoundColumn class

1 Answer 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
EDevLuna
Top achievements
Rank 1
EDevLuna asked on 06 Oct 2010, 02:54 PM
I am attempting to implement the Grid / Google-like filtering example described here. However in my approach instead of clearing the MasterTableView columns in Page_Load and replacing them with the inherited GridBoundColumns I'm attempting to declare them in the designer source as follows:

<%@ Register TagPrefix="telerikCustom" Namespace="Project.Views.UserControl.CustomFilter" %>
<telerik:RadGrid ID="RADFilterContractList" runat="server"
        AutoGenerateColumns="False"
        AllowFilteringByColumn="True"       
        AllowPaging="True"
        AllowSorting="True"
        Skin="Hay"
        OnColumnCreating="RADFilterContractList_ColumnCreating"
        OnItemCommand="RADFilterContractList_ItemCommand"
        OnNeedDataSource="RADFilterContractList_NeedDataSource" GridLines="None">
    <PagerStyle Mode="NumericPages" />
    <MasterTableView Width="100%" GroupLoadMode="Client">
    <GroupByExpressions>
        <telerik:GridGroupByExpression>
            <SelectFields>
                <telerik:GridGroupByField
                FieldName="Priority"
                HeaderText="Priority"/>
            </SelectFields>
            <GroupByFields>
                <telerik:GridGroupByField
                FieldName="Priority"
                SortOrder="Descending" />
            </GroupByFields>
        </telerik:GridGroupByExpression>
    </GroupByExpressions>
        <Columns>
            <telerik:GridTemplateColumn UniqueName="ActionHeaderColumn" SortExpression="Action">
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="lnkContractAction" Text='<%# Eval("ContractId") %>' OnClick="OnContractSelected"
                    OnClientClick='<%# "return onContractSelected(" + Eval("ContractId") + ");" %>' />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Assigned To" >
                <ItemTemplate>caadmin</ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerikCustom:ContractListCustomFilter DataField="ContractId" HeaderText="Contract Id (Dev use)" />
            <telerikCustom:ContractListCustomFilter DataField="ContractOrderNumber" HeaderText="Contract Order Number" />
            <telerikCustom:ContractListCustomFilter DataField="Customer" HeaderText="Customer" ReadOnly="true" />                           
            <telerikCustom:ContractListCustomFilter DataField="MarketState" HeaderText="State" />
            <telerikCustom:ContractListCustomFilter DataField="ContractStatus" HeaderText="Contract Status" />
            <telerikCustom:ContractListCustomFilter DataField="Price" HeaderText="Price" />
            <telerikCustom:ContractListCustomFilter DataField="MarginPerKwh" HeaderText="Margin Per Kwh" ReadOnly="true" />                   
            <telerikCustom:ContractListCustomFilter DataField="TermInMonths" HeaderText="Term (in Months)" />
            <telerikCustom:ContractListCustomFilter DataField="StartDate" HeaderText="Start Date" />
            <telerikCustom:ContractListCustomFilter DataField="TermUsageInMWh" HeaderText="Term Usage (in MWhs)" />
            <telerikCustom:ContractListCustomFilter DataField="SalesRep" HeaderText="Sales Rep" />
            <telerikCustom:ContractListCustomFilter DataField="LastNote" HeaderText="Notes" />
            <telerikCustom:ContractListCustomFilter DataField="Priority" HeaderText="Priority" />
        </Columns>
    </MasterTableView>
    </telerik:RadGrid>
It works great when I do it in the code-behind of the custom control however I feel declaring it in the .ascx page is much cleaner.

1 Answer, 1 is accepted

Sort by
0
EDevLuna
Top achievements
Rank 1
answered on 08 Oct 2010, 05:44 PM
Issue was resolved by adding the following line to the web.config:


<add tagPrefix="telerikCustom" namespace="Project.Views.UserControl.FilterBoundColumn" assembly="Project"/>

Thanks for all the help on this issue
Tags
Grid
Asked by
EDevLuna
Top achievements
Rank 1
Answers by
EDevLuna
Top achievements
Rank 1
Share this question
or