in my radGrid I've a GridTemplateColumn like this:
<telerik:GridTemplateColumn UniqueName="statusCln" HeaderText="<%$ Resources: Activity, ActivityStatus %>" |
AutoPostBackOnFilter="true" DataField="ActivityStatus.Description"> |
<ItemTemplate> |
<asp:Label ID="lblStatus" runat="server" Text=""></asp:Label> |
<asp:Label Font-Size="0.9em" ForeColor="Red" ID="assignerLbl" runat="server" Text=""></asp:Label> |
</ItemTemplate> |
<FilterTemplate> |
<telerik:RadComboBox runat="server" ID="ComboForStatus" AutoPostBack="true" |
OnClientSelectedIndexChanged="StatusIndexChanged"> |
<Items> |
<telerik:RadComboBoxItem Text="<%$Resources:General,Select %>" Value="0" /> |
</Items> |
</telerik:RadComboBox> |
<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server"> |
<script type="text/javascript"> |
function StatusIndexChanged(sender, args) { |
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); |
tableView.filter("statusCln", args.get_item().get_text(), 1); |
} |
</script> |
</telerik:RadScriptBlock> |
</FilterTemplate> |
</telerik:GridTemplateColumn> |
My problem is that the filter using the RadComboBox doesn't work.
As you can see from the code, filtering happens client side using the tableView.filter function. This function requires the uniquename of the GridTemplateColumn. I suppose that filtering doesn't work because in my case this column is associated with 2 different values (the values in of the 2 labels).
Marco
20 Answers, 1 is accepted
The markup you provide is correct. I tested it in a sample project and it works. Can you give us some more details on what is your RadComboBox setup. How do you bind it? Where do you set its DataTextField and DataValueField properties? Also, note a few things:
Sincerely yours,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridFilteringItem) |
{ |
if (item.FindControl("ComboForStatus") != null) |
{ |
if (activityStates == null) |
activityStates = ActivityBiz.Instance.ListActivityStatus(webUser.LanguageId, defaultLanguageId); |
RadComboBox ComboForStatus = (RadComboBox)item.FindControl("ComboForStatus"); |
ComboForStatus.DataSource = activityStates; |
ComboForStatus.DataTextField = "Description"; |
ComboForStatus.DataValueField = "Id"; |
} |
} |
} |
But in my point of view, the problem is on the filter.
If you review the code in my last post, you can see that the ItemTemplate of the GridTemplateColumn contains 2 asp:Labels, which are bounded server side in the ItemDataBound event.
The first Label (lblStatus) contains the text to filter. In other words when I choose 1 item in the RadComboBox, I want that the RadGrid is filtered with (lblStatus.Text = item.DataTextField).
This situation works well if inside the Itemtemplate there is only one Label.
But when there are 2 Labels, there's no way in the filter to specify which is the Label to filter.
Marco
Actually, I believe you will need to disable autopostback for your combo, as filter() command essentially causes a postback. You can find attached a small web page that demonstrates two implementation approaches for RadComboBox in the FilterTemplate. The first column (ID) has the combo fire filter command from the client (the approach you have taken), while the second column (Name) has a filtering combo that makes a postback and filters from its server-side SelectedIndexChanged event.
Greetings,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

I have a custom filter combo (for date values) when I try to TableView.filter, it is throwing below error on Client Side Script.
"Specified Cast is not valid"
<telerik:GridBoundColumn DataField="Do_Not_Spud_Before_Date" AllowFiltering="true" HeaderText="DNSB" DataFormatString="{0:d}" |
UniqueName="Do_Not_Spud_Before_Date" HeaderStyle-Width="125px"> |
<FilterTemplate> |
<telerik:RadComboBox ID="RadComboBoxDNSB" DataTextField="Do_Not_Spud_Before_Date" DataValueField="Do_Not_Spud_Before_Date" |
Width="125px" AppendDataBoundItems="true" runat="server" OnClientSelectedIndexChanged="DNSB_SelectedIndexChanged"> |
<Items> |
</Items> |
</telerik:RadComboBox> |
<telerik:RadScriptBlock ID="RadScriptBlock4" runat="server"> |
<script type="text/javascript"> |
function DNSB_SelectedIndexChanged(sender, args) { |
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); |
tableView.filter("Do_Not_Spud_Before_Date", args.get_item().get_value(), "EqualTo"); |
} |
</script> |
</telerik:RadScriptBlock> |
</FilterTemplate> |
</telerik:GridBoundColumn> |
Main.aspx.cs Page: |
==================== |
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) |
{ |
if (e.Item is GridFilteringItem) |
{ |
List<clsDNSBDate> myList = new List<clsDNSBDate>(); |
clsDNSBDate p1 = new clsDNSBDate(); |
p1.Do_Not_Spud_Before_Date = DateTime.Today; |
p1.DTText = "ALL"; |
clsDNSBDate p2 = new clsDNSBDate(); |
p2.Do_Not_Spud_Before_Date = DateTime.Today.AddDays(7); |
p2.DTText = "7 Days"; |
myList.Add(p1); |
myList.Add(p2); |
GridFilteringItem filterItem = (GridFilteringItem)e.Item; |
RadComboBox combo = (RadComboBox)filterItem["Do_Not_Spud_Before_Date"].FindControl("RadComboBoxDNSB"); |
RadComboBoxItem item1 = new RadComboBoxItem(); |
DateTime dt = DateTime.Today; |
combo.DataSource = myList; |
combo.DataTextField = "DTText"; |
combo.DataValueField = "Do_Not_Spud_Before_Date"; |
combo.DataBind(); |
//combo.AutoPostBack = true; |
//combo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(FilterCombo_SelectedIndexChanged); |
} |
} |
public class clsDNSBDate |
{ |
private DateTime _DTVal; |
private string _DTText; |
public override string ToString() |
{ |
return _DTText; |
} |
// Properties |
public DateTime Do_Not_Spud_Before_Date |
{ |
get { return _DTVal; } |
set { _DTVal = value; } |
} |
public string DTText |
{ |
get { return _DTText; } |
set { _DTText = value; } |
} |
} |
Try the following call instead:
tableView.filter(
"Do_Not_Spud_Before_Date"
, args.get_item().get_value(), Telerik.Web.UI.GridFilterFunction.EqualTo);
Note the third argument. The method expects a numeric value representing the filter function.
Telerik.Web.UI.GridFilterFunction.EqualTo returns 5.
Regards,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

Hi Veli,
Thanks for the help and it works only when filtering equal value. But If use in below scenario, to use "Between" filter to compare the date, it is not working. Without using datepicker, How can I format and compare the two dates using between
tableView.filter("DNSB_Date", Filterdate + " " + args.get_item().get_value(), Telerik.Web.UI.GridFilterFunction.Between); which is not filtering |
Thanks..
<telerik:GridBoundColumn UniqueName="DNSB_Date" DataType="System.DateTime" DataField="DNSB_Date" HeaderText="DNSB Date" |
DataFormatString="{0:d}" HeaderStyle-Width="125px" FilterListOptions="VaryByDataType" > |
<FilterTemplate> |
<telerik:RadComboBox ID="RadComboBoxDNSB" DataTextField="DNSB_Date" DataType="System.DateTime" DataValueField="DNSB_Date" |
Width="125px" DataFormatString="{0:d}" AppendDataBoundItems="false" runat="server" OnClientSelectedIndexChanged="DNSB_SelectedIndexChanged" |
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DNSB_Date").CurrentFilterValue %>'> |
<Items> |
</Items> |
</telerik:RadComboBox> |
<telerik:RadScriptBlock ID="RadScriptBlock4" runat="server"> |
<script type="text/javascript"> |
function DNSB_SelectedIndexChanged(sender, args) { |
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); |
var Filterdate = new Date(); |
var day = Filterdate.getDate() |
var month = Filterdate.getMonth() |
var year = Filterdate.getFullYear() |
var currentDate = day + "/" + month + "/" + year; |
var ComboDate = new Date(args.get_item().get_value()); |
var day1 = ComboDate.getDate() |
var month1 = ComboDate.getMonth() |
var year1 = ComboDate.getFullYear() |
var ComboDt = day1 + "/" + month1 + "/" + year1; |
if (currentDate == ComboDt) { |
tableView.filter("DNSB_Date", args.get_item().get_value(), Telerik.Web.UI.GridFilterFunction.NoFilter); |
} else { |
tableView.filter("DNSB_Date", Filterdate + " " + args.get_item().get_value(), Telerik.Web.UI.GridFilterFunction.Between); |
} |
} |
</script> |
</telerik:RadScriptBlock> |
</FilterTemplate> |
<HeaderStyle Width="125px"></HeaderStyle> |
</telerik:GridBoundColumn> |
When you concatenate a Date object with a string, the Date object is converted to its default string representation. E.g. Mon Nov 30 2009 12:50:20 GMT+0200 (FLE Standard Time). Try:
tableView.filter(
"DNSB_Date"
, Filterdate.format(
"d"
) +
" "
+ args.get_item().get_value(), Telerik.Web.UI.GridFilterFunction.Between);
Note that I use Filterdate.format("d") to convert my Date object into a string of the form MM/dd/yyyy. You need to make sure args.get_item().get_value() is also in same format.
All the best,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

How to add filter template to dynamically created RADGrid with template fields.
You need to follow the guidelines in the RadGrid Programmatic Creation help topic (section "Creating template columns programmatically). The rules for initializing any template programmatically in RadGrid are the same - the entire grid needs to be created in the Init phase of the page.
Veli
the Telerik team

i have created dynamic RADGrid in init.. I want to add filter template for the template field column . How can i do this ......
The section named Creating Template Columns Programmatically demonstrates how templates can be programmatically created and added to RadGrid. You need to initialize filter templates in the same manner. For more information on programmatic template creation in ASP.NET, please refer to this MSDN article.
Veli
the Telerik team

Thanks for replay ,
i have created template field and create Filter template also ... i defined RadComboBox in Filter template which is not giving me filter expression ..
Veli
the Telerik team

Thanks for replay veli,
I have generated dynamic Radgird with reference to article . it works fine .
But image button in template field is not working .
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt;
dt = CustomeFilterColumn.GetDataTable("select BusinessUnitId,BusinessUnit,CASE statusID WHEN '0' THEN 'Inactive' WHEN '1' THEN 'Active' END AS statusID from BusinessUnit");//("Select BusinessUnitId from ATIBusinessUnit");//
this.RadGrid1.MasterTableView.Columns.Clear();
CommonMethods com = new CommonMethods();
RadGrid1.AutoGenerateColumns = false;
RadGrid1.AllowFilteringByColumn = true;
com.selectPrimaryColumn(13);
GridTemplateColumn _tFiled1 = new GridTemplateColumn();
////TemplateField _tFiled = new TemplateField();
_tFiled1.HeaderText = "Test";
_tFiled1.AllowFiltering = false;
_tFiled1.ItemTemplate = new ATI.CommonMethods.Components.GridViewTemplate(DataControlRowType.DataRow, "BusinessUnitId", "im");
RadGrid1.MasterTableView.Columns.Add(_tFiled1);
foreach (DataColumn dataColumn in dt.Columns)
{
if (dataColumn.ColumnName != "BusinessUnitId")
{
CustomeFilterColumn gridColumn = new CustomeFilterColumn();
gridColumn.AllowFiltering = true;
this.RadGrid1.MasterTableView.Columns.Add(gridColumn);
gridColumn.DataField = dataColumn.ColumnName;
gridColumn.HeaderText = dataColumn.ColumnName;
}
}
}
And this is the template class definition
public class GridViewTemplate : GridTemplateColumn, ITemplate
{
private DataControlRowType templateType;
private string columnName;
private string controlType;
public GridViewTemplate( DataControlRowType type, string colname,string control)
{
templateType = type;
columnName = colname;
controlType = control;
}
public void InstantiateIn(System.Web.UI.Control container)
{
switch (templateType)
{
case DataControlRowType.Header:
Label _hedare=new Label ();
_hedare.Text="Hedare";
_hedare.ID="lblHedare1";
TableCell cell = new TableCell();
cell.Controls.AddAt(0,_hedare);
container.Controls.Add(cell);
break;
case DataControlRowType.DataRow:
if (controlType == "cb")
{
CheckBox cb = new CheckBox();
cb.DataBinding += delegate(object sender, EventArgs e)
{
cb.ID = "chkStatus";
Telerik.Web.UI.GridDataItem _row = (Telerik.Web.UI.GridDataItem)cb.NamingContainer;
// GridViewRow _row = (GridViewRow)cb.NamingContainer;
string _value = DataBinder.Eval(_row.DataItem, "RecordStatus").ToString();
if (_value == "Active")
{
cb.Checked = true;
}
else
{
cb.Checked = false;
}
//cb.Checked = Convert.ToBoolean(DataBinder.Eval(_row.DataItem, "StatusID"));
};
container.Controls.Add(cb);
}
if (controlType == "im")
{
ImageButton cb = new ImageButton();
cb.DataBinding += delegate(object sender, EventArgs e)
{
cb.ID = "imgCommand";
cb.ImageUrl = "~/images/edit.gif";
Telerik.Web.UI.GridDataItem _row = (Telerik.Web.UI.GridDataItem)cb.NamingContainer;
// GridViewRow _row = (GridViewRow)cb.NamingContainer;
string _value = DataBinder.Eval(_row.DataItem, columnName).ToString();
cb.CommandArgument = DataBinder.Eval(_row.DataItem, columnName).ToString();
cb.CommandName = "Edit";
};
cb.Click+=new ImageClickEventHandler(cb_Click);
container.Controls.Add(cb);
}
//if (controlType == "StatusID")
//{
// TableCell cell11 = new TableCell();
// SetupFilterControls(cell11);
//}
break;
default:
break;
}
}
protected void cb_Click(object sender, EventArgs e)
{
}
}
i tried this code in page_inti also
Veli
the Telerik team

problem is solved ...... thanks for you help

I am not able to get the datakeyvalue of the dynamic generated radgrid.
exception - Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
if ((e.CommandName == "Filter"))
{
foreach (GridColumn column in e.Item.OwnerTableView.Columns)
{
column.CurrentFilterValue = string.Empty;
column.CurrentFilterFunction = GridKnownFunction.NoFilter;
}
}
if (e.CommandName == "Edit")
{
Response.Redirect(EditUrl("Update", "", "Update", "BusinessUnitID", e.CommandArgument.ToString()),false);
}
if (e.CommandName == "Redirect")
{
if (e.Item.Parent != null)
{
string a = e.Item.OwnerTableView.DataKeyValues[e.Item.RowIndex]["BusinessUnitID"].ToString();
Response.Redirect(EditUrl("Update", "", "Update", "BusinessUnitID", a), false);
}
}
}
What's the ItemType of the item that fires the "Redirect" command? Note that only data items have a meaningful ItemIndex property that you can use with e.Item.OwnerTableView.DataKeyValues. If the "Redirect" command is fired from non-data items like header, filter, pager or command item, you will not get a valid item index to extract values for.
Veli
the Telerik team

it is working only no filter and contains only starts with and equal to not working for
<telerik:GridTemplateColumn
please update me ? i have to use
please check my code below
<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="false" AutoGenerateColumns="False"
Width="100%" PageSize="50" AllowSorting="True" AllowMultiRowSelection="true"
AllowPaging="True" AllowFilteringByColumn="true" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
OnPreRender="RadGrid1_PreRender" OnNeedDataSource="RadGrid1_NeedDataSource" GridLines="None"
OnItemCommand="RadGrid1_ItemCommand" OnDataBound="RadGrid1_DataBound" OnItemDataBound="RadGrid1_ItemDataBound"
OnExcelExportCellFormatting="RadGrid1_ExcelExportCellFormatting" OnInit="RadGrid1_Init"
Skin="Myskin" OnItemCreated="RadGrid1_ItemCreated" ItemStyle-BackColor="White"
AlternatingItemStyle-BackColor="White" EnableEmbeddedSkins="false" ViewStateMode="Enabled"
OnPageIndexChanged="RadGrid1_PageIndexChanged" Font-Size="11px" OnGridExporting="RadGrid1_GridExporting">
<%
-- <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" PageSizeLabelText="Results per page"
ShowPagerText="true" HorizontalAlign="Left" PagerTextFormat=""></PagerStyle>--
%>
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" PageSizeLabelText="Results per page"
Position="TopAndBottom" ShowPagerText="true" HorizontalAlign="Left"></PagerStyle>
<ExportSettings HideStructureColumns="true" />
<ClientSettings EnableRowHoverStyle="false">
<%
--<Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true">
</Scrolling>--
%>
<Selecting AllowRowSelect="false" />
<%
--<ClientEvents OnGridCreated="gridCreated" />--%>
</ClientSettings>
<SortingSettings EnableSkinSortStyles="false" />
<SelectedItemStyle CssClass="SelectedItem" />
<MasterTableView DataKeyNames="CredentialID,CredentialVersion" AllowMultiColumnSorting="false"
CommandItemDisplay="None" EnableNoRecordsTemplate="false" HierarchyDefaultExpanded="false"
TableLayout="Fixed" HierarchyLoadMode="ServerBind" ItemStyle-BackColor="LightGoldenrodYellow"
AlternatingItemStyle-BackColor="LightGoldenrodYellow" Name="MasterGrid">
<CommandItemSettings ShowExportToWordButton="false" ShowExportToExcelButton="false"
ShowExportToCsvButton="false" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<NoRecordsTemplate>
No Master Records Found
</NoRecordsTemplate>
<ExpandCollapseColumn HeaderStyle-Width="20px">
</ExpandCollapseColumn>
<DetailTables>
<telerik:GridTableView DataKeyNames="CredentialID,CredentialVersion" Name="Orders"
EnableNoRecordsTemplate="false" AllowPaging="false" AllowFilteringByColumn="false"
TableLayout="Fixed" AllowSorting="false" ShowHeader="false" ItemStyle-BackColor="#F0F8FF"
AlternatingItemStyle-BackColor="#F0F8FF" Width="1070px">
<NoRecordsTemplate>
<asp:Label Text="No Records Found in Credential Version (Other)" CssClass="panelStyle1"
runat="server" ID="lblChildNoRecord" ForeColor="Pink" Font-Bold="true"></asp:Label>
</NoRecordsTemplate>
<Columns>
<telerik:GridTemplateColumn UniqueName="Checkbox" Display="true" AllowFiltering="false">
<HeaderStyle Width="27px" />
<HeaderTemplate>
<asp:CheckBox ID="headerChildChkbox" runat="server" AutoPostBack="true" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkChildChild" runat="server" AutoPostBack="false" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn SortExpression="CredentialID" HeaderText="Credential id"
Visible="false" HeaderButtonType="TextButton" DataField="CredentialID" UniqueName="CredentialID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="ClientName" HeaderText="Client name" HeaderButtonType="TextButton"
DataField="ClientName" Visible="false" UniqueName="CName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn SortExpression="ClientName" UniqueName="ClientNameChild"
HeaderText="Client name" Visible="true">
<ItemTemplate>
<asp:HyperLink ID="LinkChild" runat="server" Text='<%#Bind("CredentialID") %>' Visible="false"></asp:HyperLink>
<asp:LinkButton runat="server" ID="hypidchild" Text='<%#Bind("ClientName") %>' Font-Bold="true"
OnClick="hypidchild_Click" ForeColor="Black"></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Width="204px" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn UniqueName="ProjectName" HeaderText="Project name" Visible="false"
HeaderButtonType="TextButton" DataField="ProjectName">
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="CredentialVersionChild" HeaderText="Credential version"
Visible="true" HeaderButtonType="TextButton" DataField="CredentialVersionOther"
AllowFiltering="false">
<HeaderStyle Width="120px" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Matter/credential description" UniqueName="MatterDescription"
DataField="MatterDescription" AllowFiltering="false">
<HeaderStyle Width="719px" />
<ItemTemplate>
<asp:Label ID="lblMatterDescription" runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Matter/credential description" UniqueName="ConfidentialYes"
DataField="MatterDescription" AllowFiltering="false" Visible="false">
<ItemTemplate>
<asp:Label ID="lblConfidentialYes" runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Matter/credential description" UniqueName="ConfidentialNo"
DataField="MatterDescription" AllowFiltering="false" Visible="false">
<ItemTemplate>
<asp:Label ID="lblConfidentialNo" runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn SortExpression="ClientSector" UniqueName="ClientSector"
HeaderText="Client sector" DataField="ClientSector" Visible="false">
<ItemTemplate>
<asp:Label runat="server" ID="lblClientSector" Text='<%#Bind("ClientSector")%>' CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypClientSectormore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTClientSector" runat="server" TargetControlID="hypClientSectormore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn SortExpression="MatterSector" UniqueName="MatterSector"
HeaderText="Matter sector" DataField="MatterSector" Visible="false">
<ItemTemplate>
<asp:Label runat="server" ID="lblMatterSector" Text='<%#Bind("MatterSector")%>' CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypMatterSectormore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTMatterSector" runat="server" TargetControlID="hypMatterSectormore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Work type" UniqueName="WT" DataField="WorkType"
Visible="false">
<ItemTemplate>
<asp:Label ID="lblWorkType" runat="server" Text=""></asp:Label>
<asp:LinkButton runat="server" ID="hypmore" Text="...more" Font-Bold="true" ForeColor="BurlyWood"
Visible="false"></asp:LinkButton>
<telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="hypmore" Width="150px"
RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn SortExpression="PracticeGroup" UniqueName="PracticeGroup"
HeaderText="Practice group" DataField="PracticeGroup" Visible="false">
<ItemTemplate>
<asp:Label runat="server" ID="lblPracticeGroup" Text='<%#Bind("PracticeGroup")%>'
CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypPracticeGroupmore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTPracticeGroup" runat="server" TargetControlID="hypPracticeGroupmore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn SortExpression="LeadPartner" UniqueName="LeadPartner"
HeaderText="Lead partner" DataField="LeadPartner" Visible="false">
<ItemTemplate>
<asp:Label runat="server" ID="lblLeadPartner" Text='<%#Bind("LeadPartner")%>' CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypLeadPartnermore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTLeadPartner" runat="server" TargetControlID="hypLeadPartnermore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn SortExpression="MatterLocation" UniqueName="MatterLocation"
HeaderText="Matter location" DataField="MatterLocation" Visible="false">
<ItemTemplate>
<asp:Label runat="server" ID="lblMatterLocation" Text='<%#Bind("MatterLocation")%>'
CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypMatterLocationmore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTMatterLocation" runat="server" TargetControlID="hypMatterLocationmore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn SortExpression="DateCompleted" HeaderText="Date completed"
Visible="false" HeaderButtonType="TextButton" DataField="DateCompleted" UniqueName="DateCompleted">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="CredentialType" HeaderText="Credential type"
Visible="false" HeaderButtonType="TextButton" DataField="CredentialType">
<HeaderStyle Width="10%" />
<ItemStyle Width="10%" />
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridTemplateColumn UniqueName="Checkbox" Display="true" AllowFiltering="false">
<ItemTemplate>
<asp:CheckBox ID="chkMasterChild" runat="server" AutoPostBack="false" />
</ItemTemplate>
<HeaderTemplate>
<table>
<tr>
<td>
<asp:CheckBox ID="chkMasterHead" runat="server" AutoPostBack="false" onclick="RowSelectedMaster(this);" />
</td>
</tr>
</table>
</HeaderTemplate>
<HeaderStyle Width="30px" />
</telerik:GridTemplateColumn>
<%
--<telerik:GridClientSelectColumn HeaderStyle-Width="20px" UniqueName="Checkbox" Visible="false">
<HeaderStyle Width="20px" />
</telerik:GridClientSelectColumn>--
%>
<telerik:GridBoundColumn SortExpression="CredentialID" HeaderText="Credential id"
Visible="false" HeaderButtonType="TextButton" DataField="CredentialID" UniqueName="CredentialID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="ClientName" HeaderText="Client name" HeaderButtonType="TextButton"
DataField="ClientName" Visible="false" UniqueName="CName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn SortExpression="ClientName" UniqueName="ClientName" HeaderText="Client name"
DataField="ClientName" Visible="true" FilterControlWidth="115px">
<ItemTemplate>
<asp:HyperLink ID="Link" runat="server" Text='<%#Bind("CredentialID") %>' Visible="false"></asp:HyperLink>
<asp:LinkButton runat="server" ID="hypid" Text='<%#Bind("ClientName") %>' Font-Bold="true"
OnClick="hypid_Click" ForeColor="Black"></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Width="200px" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn UniqueName="ProjectName" HeaderText="Project name" Visible="false"
HeaderButtonType="TextButton" DataField="ProjectName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn SortExpression="" UniqueName="CredentialVersion" HeaderText="Credential version"
DataField="CredentialVersion" Visible="true" AllowFiltering="false">
<ItemTemplate>
<asp:Label runat="server" ID="lblCredentialVersion" Text='<%#Bind("CredentialVersion")%>'
CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypCredentialVersionmore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTCredentialVersion" runat="server" TargetControlID="hypCredentialVersionmore"
Width="150px" RelativeTo="Element" Position="MiddleRight" Visible="false">
</telerik:RadToolTip>
</ItemTemplate>
<HeaderStyle Width="120px" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Matter/credential description" UniqueName="MatterDescription"
DataField="MatterDescription" FilterControlWidth="300px">
<HeaderStyle Width="700px" />
<ItemTemplate>
<asp:Label ID="lblMatterDescription" runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Matter/credential description" UniqueName="ConfidentialYes"
DataField="MatterDescription" AllowFiltering="false" Visible="false">
<ItemTemplate>
<asp:Label ID="lblConfidentialYes" runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Matter/credential description" UniqueName="ConfidentialNo"
DataField="MatterDescription" AllowFiltering="false" Visible="false">
<ItemTemplate>
<asp:Label ID="lblConfidentialNo" runat="server" Text=""></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn SortExpression="ClientSector" UniqueName="ClientSector"
HeaderText="Client sector" DataField="ClientSector" Visible="true" FilterControlWidth="150px">
<ItemTemplate>
<asp:Label runat="server" ID="lblClientSector" Text='<%#Bind("ClientSector")%>' CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypClientSectormore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTClientSector" runat="server" TargetControlID="hypClientSectormore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
<HeaderStyle Width="200px" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn SortExpression="MatterSector" UniqueName="MatterSector"
HeaderText="Matter sector" DataField="MatterSector" Visible="true" FilterControlWidth="150px">
<ItemTemplate>
<asp:Label runat="server" ID="lblMatterSector" Text='<%#Bind("MatterSector")%>' CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypMatterSectormore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTMatterSector" runat="server" TargetControlID="hypMatterSectormore"
Width="180px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
<HeaderStyle Width="200px" />
<%
--<ItemStyle Width="8%" />--%>
</telerik:GridTemplateColumn>
<%
-- <telerik:GridBoundColumn SortExpression="MatterSector" HeaderText="MatterSector"
HeaderButtonType="TextButton" DataField="MatterSector" UniqueName="MatterSector">
<HeaderStyle Width="15%" />
<ItemStyle Width="15%" Wrap="true" />
</telerik:GridBoundColumn>--
%>
<telerik:GridTemplateColumn HeaderText="Work type" UniqueName="WT" DataField="WorkType"
AllowFiltering="false">
<HeaderStyle Width="190px" />
<ItemStyle Wrap="true" />
<ItemTemplate>
<asp:Label ID="lblWorkType" runat="server" Text=""></asp:Label>
<asp:LinkButton runat="server" ID="hypmore" Text="...more" Font-Bold="true" ForeColor="BurlyWood"
Visible="false"></asp:LinkButton>
<telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="hypmore" Width="150px"
RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
</telerik:GridTemplateColumn>
<%
-- <telerik:GridBoundColumn SortExpression="PracticeGroup" HeaderText="PracticeGroup"
HeaderButtonType="TextButton" DataField="PracticeGroup" UniqueName="PracticeGroup">
<HeaderStyle Width="15%" />
<ItemStyle Width="15%" Wrap="true" />
</telerik:GridBoundColumn>--
%>
<telerik:GridTemplateColumn SortExpression="PracticeGroup" UniqueName="PracticeGroup"
HeaderText="Practice group" DataField="PracticeGroup" Visible="true" FilterControlWidth="150px">
<ItemTemplate>
<asp:Label runat="server" ID="lblPracticeGroup" Text='<%#Bind("PracticeGroup")%>'
CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypPracticeGroupmore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTPracticeGroup" runat="server" TargetControlID="hypPracticeGroupmore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
<HeaderStyle Width="200px" />
<%
--<ItemStyle Width="8%" />--%>
</telerik:GridTemplateColumn>
<%
--<telerik:GridBoundColumn SortExpression="LeadPartner" HeaderText="LeadPartner" HeaderButtonType="TextButton"
DataField="LeadPartner" UniqueName="LeadPartner">
<HeaderStyle Width="15%" />
<ItemStyle Width="15%" Wrap="true" />
</telerik:GridBoundColumn>--
%>
<telerik:GridTemplateColumn SortExpression="LeadPartner" UniqueName="LeadPartner"
HeaderText="Lead partner" DataField="LeadPartner" Visible="true" FilterControlWidth="140px">
<ItemTemplate>
<asp:Label runat="server" ID="lblLeadPartner" Text='<%#Bind("LeadPartner")%>' CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypLeadPartnermore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTLeadPartner" runat="server" TargetControlID="hypLeadPartnermore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
<HeaderStyle Width="190px" />
<%
--<ItemStyle Width="5%" />--%>
</telerik:GridTemplateColumn>
<%
--<telerik:GridBoundColumn SortExpression="MatterLocation" HeaderText="MatterLocation"
HeaderButtonType="TextButton" DataField="MatterLocation" UniqueName="MatterLocation">
<HeaderStyle Width="15%" />
<ItemStyle Width="15%" Wrap="true" />
</telerik:GridBoundColumn>--
%>
<telerik:GridTemplateColumn SortExpression="MatterLocation" UniqueName="MatterLocation"
HeaderText="Matter location" DataField="MatterLocation" Visible="true" FilterControlWidth="140px">
<ItemTemplate>
<asp:Label runat="server" ID="lblMatterLocation" Text='<%#Bind("MatterLocation")%>'
CssClass="panelStyle1"></asp:Label>
<asp:LinkButton runat="server" ID="hypMatterLocationmore" Text="...more" Font-Bold="true"
ForeColor="BurlyWood" Visible="false" CssClass="panelStyle1"></asp:LinkButton>
<telerik:RadToolTip ID="radTTMatterLocation" runat="server" TargetControlID="hypMatterLocationmore"
Width="150px" RelativeTo="Element" Position="MiddleRight">
</telerik:RadToolTip>
</ItemTemplate>
<HeaderStyle Width="190px" />
<%
--<ItemStyle Width="5%" />--%>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
In order to achieve your scenario you could follow the help article below.
Could you provide more information on your scenario. Is the filtering does not work for all template columns or for particular one?
Regards,
Antonio Stoilkov
the Telerik team