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

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

1 Answer 65 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Akki
Top achievements
Rank 1
Akki asked on 27 Feb 2012, 11:57 AM
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

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 29 Feb 2012, 04:48 PM
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,
Tags
Filter
Asked by
Akki
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or