Hide link after time pass

2 posts, 1 answers
  1. L
    L avatar
    298 posts
    Member since:
    Apr 2008

    Posted 23 Mar 2016 Link to this post


    I would like to hide link when time has passed. How should i go about it? Thanks a lot

    <telerik:GridBoundColumn DataField="Time"   FilterControlAltText="Filter Time column" HeaderText="Time" ReadOnly="True" SortExpression="Time" UniqueName="Time">

       <telerik:GridButtonColumn CommandName="detailcolumn" FilterControlAltText="Filter column column" ItemStyle-ForeColor="#3498DB" ItemStyle-Font-Underline="true"  HeaderText="Detail" Text="Detail" 
                            UniqueName="detailcolumn" >                     


  2. Answer
    Kostadin avatar
    1733 posts

    Posted 28 Mar 2016 Link to this post


    I am not sure if you need to hide the LinkButtons on the client or on the server. In case you need to do that on the server you can loop through all GridDataItem of the grid by using Items property and access the LinkButton controls as described in the following help article.
    foreach (GridDataItem item in RadGrid1.Items)
        LinkButton button = item["detailcolumn"].Controls[0] as LinkButton;

    You can use a similar approach to access the buttons on the client but you need to use get_dataItems method to get all items and use get_cell to access a specific cell value.

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top