Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
In my code I want a functionality in which if admin deactivate group that group name should be appear in disable form in every gridview. and radio button of disabled row should not be select
Posted

1 solution

instead of making disable i tried as making visible false for the button in gridview,like:
XML
<asp:GridView runat="server" ID="GV1" AutoGenerateColumns="false">
    <Columns>
        <asp:BoundField DataField="Name" HeaderText="Name" />
        <asp:BoundField DataField="Age" HeaderText="Age" />
        <asp:TemplateField>
            <ItemTemplate>
                <asp:Button runat="server" Text="Reject"
                Visible='<%# IsOverAgeLimit((Decimal)Eval("Age")) %>' />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>



Then, in the code behind, add in the method:
C#
protected Boolean IsOverAgeLimit(Decimal Age) {
    return Age > 35M;
}


check whether it is useful
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900