Hide link after time pass

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

    Posted 23 Mar Link to this post

    hi

    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">
                        <ColumnValidationSettings>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>

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

     

  2. Answer
    Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 28 Mar Link to this post

    Hi,

    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.

    Regards,
    Kostadin
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top