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

Hide link after time pass

1 Answer 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 24 Mar 2016, 03:51 AM

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>

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Kostadin
Telerik team
answered on 28 Mar 2016, 11:03 AM
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.
Tags
Grid
Asked by
L
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or