Filter not working when inside GridTemplateColumn which is having asp:LinkButton as itemtemplate

2 posts, 0 answers
  1. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 27 Feb 2012 Link to this post

    Hi,
    i am getting following exception when i type characters in filter column.

      "No property or field 'jghjghj' exists in type 'DataRowView'


      <MasterTableView AllowPaging="true" AllowFilteringByColumn="true" CommandItemDisplay="Top"
                    Width="100%">
                    <PagerStyle Mode="NextPrev" AlwaysVisible="true"/>
                    <CommandItemSettings ShowExportToExcelButton="true" ShowRefreshButton="false" ShowAddNewRecordButton="false" />
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="Budget ID" DataField="budhdrtky" UniqueName="BudgetID"
                            Visible="true" ReadOnly="true">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkBtnBudgetId" runat="server" Text='<%#Eval("budhdrtky")%>'></asp:LinkButton>
                            </ItemTemplate>
                            <HeaderStyle Width="130px" />
                            <ItemStyle Width="130px" />
                        </telerik:GridTemplateColumn>
    </Columns>

    What changes do i need to do ??

    Regards,
    Akki
  2. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 29 Feb 2012 Link to this post

    Akki:

    I think you'd find it easier to implement filtering of the Budget ID string by changing from the use of an <asp:linkbutton> in a GridTemplateColumn to the use of a HyperLink Column which gives the same functionality.

    The GridHyperLinkColumn uses the field name specified by the DataTextField for filtering.

    Regards,
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top