Tyler wrote:
Is there a way to conditionally show the select button.
I don't want to show (or at lease disable) the select button based on the
data I am retrieving in that row.
Any help is appreciated.
Thanks
--
Tyler
Clear the cell contained the select button on RowDataBound.
Example:
html
<asp:GridView ID="GridView1" runat="server"
OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:CommandField ShowSelectButton="True" />
</Columns>
</asp:GridView>
protected void GridView1_RowDataBound(object sender,
GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (needToHideCondition)
e.Row.Cells[0].Text = "";
}
}