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

Can't maintain link:visited color in RadGrid ButtonColumn

2 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jason Zam
Top achievements
Rank 1
Jason Zam asked on 08 Apr 2010, 03:11 PM
Hello,

I am trying to change the color of a visited link (which is a GridButtonColumn) in a RadGrid, AND then maintain that color if the user hits the back button.

Here's my problem.  When the user clicks the link (GridButtonColumn), the link changes to my specified color via my CSS and then the link takes the user to a new page.  However, if the user hits the back button on the web browser, the visited link in the RadGrid resorts back to it's original color and not the visited link color.  How can I maintain the visited link color when the user pages back?

My CSS:

.RadGrid

 

a:visited {color:Orange !important;}

My RadGrid Code:

 

<telerik:RadGrid ID="radgrdAssignment" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" AllowMultiRowSelection="True" ShowStatusBar="False" PageSize="25" GridLines="None" HorizontalAlign="NotSet" runat="server">  
    <MasterTableView DataKeyNames="AssignmentID" ShowHeadersWhenNoRecords="True">  
    <Columns> 
        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">  
        <HeaderStyle Width="30px" HorizontalAlign="Center" /> 
        <ItemStyle Width="30px" HorizontalAlign="Center" /> 
        </telerik:GridClientSelectColumn> 
        <telerik:GridButtonColumn ButtonType="LinkButton" DataTextField="AssignmentID" SortExpression="AssignmentID" HeaderText="EvalID" UniqueName="AssignmentIDButton" CommandName="Select">  
        <ItemStyle CssClass="RadGrid" /> 
        </telerik:GridButtonColumn> 
        <telerik:GridBoundColumn DataField="AssignmentID" HeaderText="AssignmentID" UniqueName="AssignmentIDData" Display="False"></telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="ProjectName" HeaderText="Project"></telerik:GridBoundColumn> 
    </Columns> 
    </MasterTableView> 
    <ClientSettings EnableRowHoverStyle="True">  
    <Selecting AllowRowSelect="True" /> 
    </ClientSettings> 
    <pagerstyle mode="NextPrevAndNumeric" AlwaysVisible="True" Position="Top" /> 
</telerik:RadGrid> 

Thanks you,
Jason

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Apr 2010, 03:41 PM
Hello Jason,

The visited state is used with hyperlinks. Browsers determine whether a hyperlink has been visited by the browser's history. LinkButtons are not hyperlinks, because they do not have an actual URL, which can be visited by the user. Instead, they execute some action (Javascript), that's why a visited state cannot be maintained for them.

Kind regards,
Dimo
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jason Zam
Top achievements
Rank 1
answered on 09 Apr 2010, 02:28 PM

Thank you for that explanation.

 

Jason

Tags
Grid
Asked by
Jason Zam
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Jason Zam
Top achievements
Rank 1
Share this question
or