문제

<telerik:GridTemplateColumn HeaderText="Code" SortExpression="Code" UniqueName="Code" AllowFiltering="True">
     <ItemTemplate>
         <asp:LinkButton ID="lbCCode" runat="server" Text='<%# Eval("Code") %>' />
     </ItemTemplate>
</telerik:GridTemplateColumn>

So how can I allow RadGrid to filter the results based on the text value of LinkButton? Is there a way to do that?

도움이 되었습니까?

해결책

Please try with the below code snippet.

<telerik:GridTemplateColumn HeaderText="Code" SortExpression="Code" UniqueName="Code" AllowFiltering="True"
        DataField="Code">
    <ItemTemplate>
        <asp:LinkButton ID="lbCCode" runat="server" Text='<%# Eval("Code") %>' />
    </ItemTemplate>
</telerik:GridTemplateColumn>

I have added DataField property in template column. if you get any error in grid then please set EnableLinqExpressions="false" in your grid.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top