Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
144 views

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>

 

Pavlina
Telerik team
 answered on 17 Sep 2012
1 answer
188 views
Hi,
     I have a gridhyperlink column in my radgrid. I want to change the forecolor of the link. How do I make the change. Please help me out.
thanks in advance
Savyo
Shinu
Top achievements
Rank 2
 answered on 17 Sep 2012
1 answer
184 views
i want to add the rad window to the master page and inherit it, but it gives me an error "Microsoft JScript runtime error: Unable to get value of the property 'show': object is null or undefined"
I have added this as follows

<%

-- "About" window --%>

 

<telerik:RadWindow runat="server" ID="AboutWindow" Overlay="false" VisibleStatusbar="false" Behaviors="Move,Close" Animation="None" Modal="true" Title="About This Demo" Width="490px" Height="425px" IconUrl="Images/about_icon.png" OnClientShow="aboutWindowShow">

 

<ContentTemplate>

 

<uc:About runat ="server" ID="AboutDialog" />

 

</ContentTemplate>

 

</telerik:RadWindow>


and i have added this function

 

function buttonClicked(sender, args) {

if (args.get_item().get_index() == 0)

$find(

 

'AboutWindow').show();

  

 

}


can you tell me what i am doing wrong
Marin Bratanov
Telerik team
 answered on 17 Sep 2012
11 answers
235 views
Hi :)

I have a radgrid and I put "allowpaging" and "allowsorting" to true, but it doesn't work :(
Here is my code :

<telerik:RadGrid runat="server" ID="List" 
  AllowPaging="true"
  AllowSorting="True"
  AllowFilteringByColumn="True"
  ShowStatusBar="true"
  AutoGenerateColumns="false"
  OnEditCommand="List_OnEditCommand"
  OnItemCommand="List_Command"
  OnItemDataBound="List_ItemDataBound"
  Visible="false">
   
  <ClientSettings EnablePostBackOnRowClick="true">
     <Selecting AllowRowSelect="True"/>
  </ClientSettings>
 
  <PagerStyle Mode="NumericPages" Position="Bottom"></PagerStyle>
  <GroupingSettings CaseSensitive="false" />
     
  <MasterTableView  ShowHeadersWhenNoRecords="true" DataKeyNames="Id"  ClientDataKeyNames="Id">
 
  <Columns>
       <telerik:GridBoundColumn DataField="Id" UniqueName="Id" HeaderText="Id"
       AutoPostBackOnFilter="true" SortExpression="Id" Visible="false">
       </telerik:GridBoundColumn>
 
       <telerik:GridTemplateColumn DataField="Name" UniqueName="Name" HeaderText="Name"
       DataType="System.String" AutoPostBackOnFilter="true" SortExpression="Name" >
       <ItemTemplate> <%# Eval("Name")%> <img src="/Images/bc_<%# Eval("name")%>.png" alt="" /></ItemTemplate>
       </telerik:GridTemplateColumn>
        
       <telerik:GridBoundColumn DataField="FirstName" UniqueName="FirstName" HeaderText="Firstname"
       DataType="System.String" AutoPostBackOnFilter="true" SortExpression="Firstname" >
       </telerik:GridBoundColumn>
 
      <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="Edit">
      </telerik:GridEditCommandColumn>
  </Columns>
  </MasterTableView>   
</telerik:RadGrid>



protected void button1_Click(object sender, EventArgs e)
        {           
            SqlConnection conn = new SqlConnection();
            SqlCommand comand = new SqlCommand("research", conn);
            comand.Parameters.Add(new SqlParameter("@id", SqlDbType.Int)).Value = u_id;
            comand.CommandType = CommandType.StoredProcedure;
            DataTable dt = new DataTable();
 
            try
            {
                conn.Open();
                SqlDataReader r = comand.ExecuteReader();
                dt.Load(r);
        
                List.DataBind();
                List.DataSource = dt;
                List.DataBind();
                List.Visible = true;
 
            }
            catch (SqlException ex)
            {
            }
            finally
            {
                    conn.Close();
            }
        }


protected void button2_Click(object sender, EventArgs e)
        {
            foreach (search cs in u.search)
            {
               u.save(u.id, u.ac, u.s);
            }
 
            SqlConnection conn = new SqlConnection();
            SqlCommand comand = new SqlCommand("proc_s", conn);
            comand.Parameters.Add(new SqlParameter("@id", SqlDbType.Int)).Value = u_id;
            comand.CommandType = CommandType.StoredProcedure;
            DataTable dt = new DataTable();
 
            try
            {
                conn.Open();
                SqlDataReader r = comand.ExecuteReader();
                dt.Load(r);
            
                List.DataSource = dt;
                List.DataBind();
                List.Visible = true;
            }
            catch (SqlException ex)
            {
            }
            finally
            {
                    conn.Close();
            }
        }


Thx
Ganesh Pote
Top achievements
Rank 1
 answered on 17 Sep 2012
1 answer
82 views
Hi all I used the following example

http://demos.telerik.com/aspnet-ajax/panelbar/examples/applicationscenarios/slidingpanelbar/defaultcs.aspx 

every thing works fine but inside my panel bar I am having a RadioButton List  which causes a postback, due to this the sliding panel bar closes. How can I over come this error

This is my design

<div class="leftPanelBarContainer">
        <div id="slidingDiv" style="visibility: hidden" runat="server">
          
    <telerik:RadPanelBar runat="server" ID="rdpbSalary" ExpandMode="FullExpandedItem"
                Skin="Vista" EnableEmbeddedSkins="false" Width="550px" Height="300px">
                <Items>
                    <telerik:RadPanelItem Expanded="true" Text="Employee Salary Information" runat="server"
                        Selected="true">
                        <Items>
                            <telerik:RadPanelItem Value="SalaryInformation" runat="server">
                                <ItemTemplate>
                                    <div style="float: right; font-family: Verdana; margin-right: 15px;">
                                        <span style="color: Red;">*</span> Denotes are Mandatory
                                    </div>
                                    <br />
                                    <div class="text" style="background-color: #ffffff">
                                        <ul class="formList" id="salaryinfo">
                                            <li>
                                                <asp:Label Width="155px" runat="server" CssClass="label1" ID="lblSalaryPayRate" AssociatedControlID="rdbtnlstPayRate">What is the Pay Rate? <span style="color:Red">*</span></asp:Label>
                                                <asp:RadioButtonList ID="rdbtnlstPayRate" runat="server" AutoPostBack="true" RepeatDirection="Horizontal"
                                                    OnSelectedIndexChanged="rdbtnlstPayRate_SelectedIndexChanged" Style="width: 155px"
                                                    ValidationGroup="salaryValidation1">
                                                    <asp:ListItem Value="S">Salary</asp:ListItem>
                                                    <asp:ListItem Value="H">Hourly</asp:ListItem>
                                                </asp:RadioButtonList>
                                                <asp:RequiredFieldValidator ID="rfvsalaryTypeID" runat="server" ControlToValidate="rdbtnlstPayRate"
                                                    CssClass="error" ErrorMessage="Please Select One Pay Rate" ValidationGroup="salaryValidation1"></asp:RequiredFieldValidator>
                                            </li>
                                            <li>
                                                <asp:Label runat="server" Width="150px" CssClass="label1" ID="lblsalaryPeriodWages"
                                                    AssociatedControlID="txtsalaryPeriodWages">Period Wages <span style="color:Red">*</span></asp:Label>
                                                <telerik:RadNumericTextBox runat="server" ID="txtsalaryPeriodWages" Width="200px"
                                                    ValidationGroup="salaryValidation" IncrementSettings-InterceptMouseWheel="false"
                                                    IncrementSettings-InterceptArrowKeys="false">
                                                </telerik:RadNumericTextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="rqrdsalaryWages" ValidationGroup="salaryValidation"
                                                    ForeColor="Red" ControlToValidate="txtsalaryPeriodWages" ErrorMessage="Required Period Wages"></asp:RequiredFieldValidator>
                                            </li>
                                            <li>
                                                <asp:Label runat="server" CssClass="label1" Width="150px" ID="lblsalaryRatePay" AssociatedControlID="txtsalaryRatePay">Rate of Pay <span style="color:Red">*</span></asp:Label>
                                                <telerik:RadNumericTextBox runat="server" ID="txtsalaryRatePay" Width="200px" ValidationGroup="hourlyValidation"
                                                    IncrementSettings-InterceptMouseWheel="false" IncrementSettings-InterceptArrowKeys="false">
                                                </telerik:RadNumericTextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="rqrdsalaryRatePay" ValidationGroup="hourlyValidation"
                                                    ForeColor="Red" ControlToValidate="txtsalaryRatePay" ErrorMessage="Required Rate of Pay "></asp:RequiredFieldValidator>
                                            </li>
                                            <li>
                                                <asp:Label runat="server" CssClass="label1" Width="150px" ID="lblSalaryOthers" AssociatedControlID="txtsalaryOthers">Hours <span style="color:Red">*</span></asp:Label>
                                                <telerik:RadNumericTextBox runat="server" ID="txtsalaryOthers" Width="200px" ValidationGroup="hourlyValidation"
                                                    IncrementSettings-InterceptMouseWheel="false" IncrementSettings-InterceptArrowKeys="false">
                                                </telerik:RadNumericTextBox>
                                                <asp:RequiredFieldValidator runat="server" ValidationGroup="hourlyValidation" ID="rqrdsalaryOther"
                                                    ControlToValidate="txtsalaryOthers" ErrorMessage="Required Other Hours Rate"
                                                    ForeColor="Red"></asp:RequiredFieldValidator>
                                            </li>
                                        </ul>
                                        <br />
                                        <asp:ValidationSummary runat="server" ID="validationSummary2" CssClass="validationSummary" />
                                        <table style="margin-left: 50px;">
                                            <tr>
                                                <td>
                                                    <telerik:RadButton ID="rdbtnsalarySave" ValidationGroup="salaryValidation1" runat="server"
                                                        Text="Save & Next" OnClick="rdbtnsalarySave_Click">
                                                    </telerik:RadButton>
                                                      
                                                    <telerik:RadButton ID="rdbtnsalaryCancel" runat="server" Text="Cancel" OnClick="rdbtnsalaryCancel_Click">
                                                    </telerik:RadButton>
                                                    <br />
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
                                    </div>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelBar>
     
             
        </div>
        <telerik:RadCodeBlock ID="rdcode" runat="server">
            <script type="text/javascript">
                var panelDomElement = $get('<%= rdpbSalary.ClientID %>');
                var timage = $get('<%= lnkAdd.ClientID %>');
 
                if (panelDomElement) {
                    SetUpAnimation(timage.id, Telerik.Web.UI.jSlideDirection.Center, panelDomElement);
                }
 
 
                function SetUpAnimation(image, direction, element) {
                    element.style.position = "relative";
                    var slider = document.getElementById(image);
 
                    var expanded = false;
 
                    var expandAnimation = new Telerik.Web.UI.AnimationSettings({});
                    var collapseAnimation = new Telerik.Web.UI.AnimationSettings({});
 
                    var slide = new Telerik.Web.UI.jSlide(element, expandAnimation, collapseAnimation, false);
 
                    slide.initialize();
 
                    slide.set_direction(direction);
 
                    slider.onclick = function () {
                        element.parentNode.style.visibility = "visible";
                        element.parentNode.style.display = "block";
                        if (!expanded) {
                            slide.expand();
                        }
                        else {
                            slide.collapse();
                        }
                        expanded = !expanded;
                        return false;
                    }
                }
            </script>
        </telerik:RadCodeBlock>
    </div>
Kate
Telerik team
 answered on 17 Sep 2012
1 answer
82 views
Good afternoon,


I have a little problem and I can not find solution for the same.
I'm using a modal window through the "window.radopen", so that when the session expires and the window is still open, if the user triggers an event in it, it is redirected to the login page.
I'd like to do a check that if the session has expired if, out instead of redirecting to the login page, I would like to fire a command to close it.

Well I tried to do this on page load the modal window: 

function GetRadWindow() {
    var oWindow = null;
    if(window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
function Close(){
    GetRadWindow().close();
}

Protected Sub Page_Load(ByVal sender as Object, ByVal e As System.EventArgs) Handles Me.load
 
    If User.Identity.IsAuthenticated = true Then
        '(...)
    Else
        RadScriptManager.RegisterClientScriptBlock(Me, [GetType()], "mykey", "Close();", True)
    End
 
End sub

Marin Bratanov
Telerik team
 answered on 17 Sep 2012
1 answer
73 views
I've been struggling to get RadWindows buttons to invoke a server side call as well as the client side javascript in the same click.
If I use a OnClientClick event I am able to get the window to close and refresh the parent, but can't get the server side save function to fire.

I'm not a strong javascript programmer and can't figure how to use javascript to fire the save event on the server side.
Any help is appreciated.
Thanks
Marin Bratanov
Telerik team
 answered on 17 Sep 2012
1 answer
71 views
I know how to load a new item into a radCombobox, but how do you do it for a multi-column combobox? This is my code for the combobox:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="radCBOLookup.ascx.vb"
    Inherits="HEW.radCBOLookup" %>
<telerik:RadComboBox ID="radCBOLookup" runat="server" MarkFirstMatch="true" AllowCustomText="false"
    Width="50px" DropDownWidth="350px" MaxHeight="300px" NoWrap="true" HighlightTemplatedItems="true"
    ExpandDirection="Down" ExpandDelay="0" CollapseDelay="0">
    <HeaderTemplate>
        <table style="width: 100%; text-align: left; font-size: 8pt">
            <tr>
                <td style="width: 20%;">
                    Code
                </td>
                <td style="width: 80%;">
                    Description
                </td>
            </tr>
        </table>
    </HeaderTemplate>
    <ItemTemplate>
        <table style="width: 100%; text-align: left; font-size: 8pt">
            <tr>
                <td style="width: 20%;">
                    <%#DataBinder.Eval(Container.DataItem, "Master_Type_Code")%>
                </td>
                <td style="width: 80%;">
                    <%#DataBinder.Eval(Container.DataItem, "Master_Desc")%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadComboBox>

VB code for radCBOLookup_ItemDataBound:
e.Item.Text = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString
 
e.Item.Value = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString.Trim
 
e.Item.Attributes("Description") = (DirectCast(e.Item.DataItem, DataRowView))("Master_Desc").ToString.Trim


Currently, the only way I have been able to figure this out is to add a new datarow to the datasource. Does anyone have any suggestions?
Kalina
Telerik team
 answered on 17 Sep 2012
1 answer
83 views
I have a radgrid in which I create a table and assign it to the Controls for an item in the Itemdatabound event as below.
I want to filter the PayoutType column based on a given list (ex , Retirement, Termination, Withdrawal). The table cell can any number of these values for one row. But since it is not bound to a database column I am unable to filter it.

Could you tell me how I can fiter in this scenario?

protected void rgPayoutElections_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = e.Item as GridDataItem;
            int accountID = Int32.Parse(item.GetDataKeyValue("AccountID").ToString());
            DataRow[] dr = PayoutElection.GetPayouts_ByAccount_ListByParticipant(Int32.Parse(Profile.ParticipantID), accountID);
             
            Table tblPayoutType = new Table();
            foreach (DataRow row in dr)
            {
                TableRow trPayoutType = new TableRow();
 
                TableCell cellPayoutType = new TableCell();
                cellPayoutType.Text = row["PayoutType"].ToString();
                cellPayoutType.CssClass = "textRed";
                trPayoutType.Cells.Add(cellPayoutType);
                tblPayoutType.Rows.Add(trPayoutType);           
            }
            item["PayoutType"].Controls.Add(tblPayoutType);
       }
    }

Andrey
Telerik team
 answered on 17 Sep 2012
1 answer
243 views
Hi,

We have a web application in which we are using RadControls. When we deploy the application on servers, most of the times it works fine.
But sometime on some servers it gives very strange behavior. It fails to load some CSS and after some time it starts working fine without making nay changes to code or configuration. Issue seems related to WebResource.axd file.
Looking into the css loaded using developer tool, it seems that in error case there are unknown tags in css webrespurce.axd.
For ref please see attahced files having a correct and error view snaps, also having css loaded in case of error view.

We are using Windows Server 2008 R2 Enterprise and IIS 7 with classic mode.

Regards,
Manish 
Kate
Telerik team
 answered on 17 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?