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

Filter in template columns

1 Answer 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 13 Oct 2010, 05:43 PM
We have the following scenario where we can not provide a DataField because the item template is binded during ItemDataBound.

            <telerik:GridTemplateColumn HeaderText="Action"  AllowFiltering="false" UniqueName="Action" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="10%" >
                <ItemTemplate>
                    <TLMASP:Label ID="TransactionActionLabel" runat="server" ></TLMASP:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>

How can we provide search functionality ?
We have an object like: 
AuditItem
{
 int id;
 ....
 Object MyObject;
}

TransactionActionLabel.Text is filled by = Cache.Get((ITransactionCapable)item.dataitem.MyObject).TransactionAction;

Should we change the way we bind the data to our grid? should we provide something like a Bindable object full of all the properties already? So the grid will interact with just a collection of these simple objects?

Bests, 
Alan.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 19 Oct 2010, 08:49 AM
Hello Alan,

You can try defing your own FilterTemplate for the problematic column and then handle the filtering manually. Find the below resources for more information:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/grdcustomfilteroptionswithhandling.html
http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html
http://www.telerik.com/help/aspnet-ajax/grdcustomoptionforfiltering.html

Best wishes,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Alan
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or