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

Filter is not working for radgrid GridTemplateColumn

4 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Subbarayudu
Top achievements
Rank 1
Subbarayudu asked on 13 Sep 2012, 10:37 AM

I created a RadGrid with <telerik:GridTemplateColumn  and <telerik:GridBoundColumn if i am using gridbound column itis working ,but using gridTemplatecolumn  it isnot working that also not all the options some of the options only

 Options  are "No filter", Contains" , "Starts with", " Equal to"
 "No filter ", "contains "are working
 "Starts with" and "Equal to" are not working please help me how to rectify this issue
 tomorrow UAT  testing  needs to close this ..
 
 Please find the code samples as mentioned 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" AllowFilteringByColumn="true">

 

 

 

 

<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="true">

 

 

 

 

<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" AllowFiltering="true">

 

 

 

 

<HeaderStyle Width="10%" />

 

 

 

 

<ItemStyle Width="10%" />

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="CredentialVersionChild" HeaderText="Credential version"

 

 

 

 

Visible="true" HeaderButtonType="TextButton" DataField="CredentialVersionOther"

 

 

 

 

AllowFiltering="true">

 

 

 

 

<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 UniqueName="ClientSector" DataField="ClientSector"

 

 

 

HeaderText="Client sector"Visible="false" SortExpression="ClientSector" AllowFiltering="true">

 

 

 

 

<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="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:GridTemplateColumn SortExpression="CredentialVersion" UniqueName="CredentialVersion"
HeaderText
="Credential version"

 

 

 

 

DataField="CredentialVersion" Visible="true" AllowFiltering="true">

 

 

 

 

<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>


4 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 13 Sep 2012, 12:41 PM
Hello,

Please add DataField in TemplateColumn.

<telerik:GridTemplateColumn DataField="ClientName" SortExpression="ClientName" UniqueName="ClientNameChild"
                        HeaderText="Client name" Visible="true">


Thanks,
Jayesh Goyani
0
Ashish
Top achievements
Rank 1
answered on 04 Aug 2014, 05:58 AM
Hi Jayesh,
I add DataField but still it is not working the filter losses its value and not working.

Thanks
0
Eyup
Telerik team
answered on 06 Aug 2014, 01:37 PM
Hi Rayudu,

I've created a sample RadGrid web site to demonstrate a basic filtering implementation. Please run the attached application and let me know about the result.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
William
Top achievements
Rank 1
answered on 06 Oct 2016, 11:45 AM
Thanks Jayesh.  I have GridTemplateColumns with ITemplates created entirely in codebehind and adding theDataField was the missing piece.
Tags
Grid
Asked by
Subbarayudu
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Ashish
Top achievements
Rank 1
Eyup
Telerik team
William
Top achievements
Rank 1
Share this question
or