make linkbutton inside a datagrid non clickable on certain conditions?
<p>I have a datagrid with linkbutton inside it.</p>

<pre><code>&lt;asp:DataGrid id="listDataGrid" Runat="server"&gt;
                &lt;Columns&gt;

                    &lt;asp:TemplateColumn HeaderText="Item Name"&gt;
                        &lt;ItemTemplate&gt;  
                            &lt;asp:LinkButton id="lbItemName" runat="server"  OnClientClick="return false;" /&gt;
&lt;/Columns&gt;
&lt;/asp:DataGrid&gt;


In c#

foreach (DataGridItem dataGridItem in listDataGrid.Items)
            {
LinkButton lbItemName;
lbItemName = (LinkButton)dataGridItem.Cells[1].FindControl("lbItemName");
if (display == false)
                {
                    lbItemName.Attributes.Add("style", "text-decoration: none;cursor: default;");
                    lbItemName.Attributes["disabled"] = "disabled";
                }

}
</code></pre>

<p>But link button still works as a clickable link. I want to make it to show as text.</p>

<p>THanks</p>
