G
Guest
I have a Datagrid on the aspx page. and the first column is a template column
with the aspLink. But I want to activate or show it as a link only if the
value in the second column is "true".
How can I do this. Please suggest.
The sample code is below.
<asp:datagrid id="DGVisits" runat="server" AllowSorting="True" Width="643px">
<ItemStyle Font-Size="X-Small" Font-Names="Verdana"
ForeColor="Black"></ItemStyle>
<HeaderStyle Font-Size="X-Small" Font-Names="Verdana" Font-Bold="True"
ForeColor="Black" BackColor="DarkGray"></HeaderStyle>
<Columns><asp:TemplateColumn HeaderStyle-BackColor="LightGrey">
<ItemTemplate>
<asp:linkbutton CommandName="Select" ID="Linkbutton1"
CausesValidation="False" Runat="server"><%#
DataBinder.Eval(Container.dataitem, "ID")%></asp:linkbutton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
Thanks,
Vic
with the aspLink. But I want to activate or show it as a link only if the
value in the second column is "true".
How can I do this. Please suggest.
The sample code is below.
<asp:datagrid id="DGVisits" runat="server" AllowSorting="True" Width="643px">
<ItemStyle Font-Size="X-Small" Font-Names="Verdana"
ForeColor="Black"></ItemStyle>
<HeaderStyle Font-Size="X-Small" Font-Names="Verdana" Font-Bold="True"
ForeColor="Black" BackColor="DarkGray"></HeaderStyle>
<Columns><asp:TemplateColumn HeaderStyle-BackColor="LightGrey">
<ItemTemplate>
<asp:linkbutton CommandName="Select" ID="Linkbutton1"
CausesValidation="False" Runat="server"><%#
DataBinder.Eval(Container.dataitem, "ID")%></asp:linkbutton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
Thanks,
Vic