Click here to Skip to main content
15,902,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

1 solution

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

Then, in the code behind, add in the method:
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