or
<
CommandItemTemplate>
<table width="100%">
<tr>
<td align="left">Third Party Mismatches</td>
<td align="right">
<asp:LinkButton ID="showFilter" runat="server" CommandName="DisplayFilter"
Text="Filter">
</asp:LinkButton>
</td>
</tr>
</table>
</
CommandItemTemplate>
What i want to do is when the user clicks on the showFilter link it will display or hide the folter depending on if it is shown already or not. I have that part working. What I can't get is to change the text to "Show Filter" if the filter is hidden and "Hide Filter" if it is shown.
| Protected Sub GrdThirdParty_ItemCommand(ByVal source As Object, _ |
| ByVal e As GridCommandEventArgs) _ |
| Handles GrdThirdParty.ItemCommand |
| If e.CommandName = "DisplayFilter" Then |
| Dim lnkButton As LinkButton = CType(e.Item.FindControl("showFilter"), LinkButton) |
| If GrdThirdParty.AllowFilteringByColumn = False Then |
| GrdThirdParty.AllowFilteringByColumn = True |
| lnkButton.Text = "Hide Filter" |
| Else |
| GrdThirdParty.AllowFilteringByColumn = False |
| lnkButton.Text = "Show Filter" |
| End If |
| GrdThirdParty.MasterTableView.Rebind() |
| End If |
| End Sub |
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title></title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="masterPageRadScriptManager" runat="server" AsyncPostBackTimeout="180" > <Scripts> <asp:ScriptReference Path="Scripts/jquery-1.4.1.js" /> </Scripts> </telerik:RadScriptManager> ... <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" /> <telerik:RadMenu ID="RadMenu1" Runat="server" DataSourceID="SiteMapDataSource1" Width="100%" style="z-index:2900"> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </telerik:RadMenu> ... <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> <asp:Panel ID="pnlErrors" runat="server" EnableViewState="false"> </asp:Panel> </form> ...</body></html>