Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have gridview and i took checkbox in gridview but i want to hide this checkbox on radiobutton click which is outside the gridview...plz help me?
Posted
Comments
Please post your code by clicking on "Improve question" link and tell us exactly where you are facing problem.

You can hide whole column based on radiobutton's selected value. You can implement OnRowCreated event of grid view mentioned at the link below

How to hide a TemplateField column in a GridView
 
Share this answer
 
I'me giving an example code using this you can control property on any control in Gridview in Templated Field

C#
protected void loadcontrols()
    {
        for (int i = 0; i < gvReply.Rows.Count; i++)
        {
            Button btnDelete = gvReply.Rows[i].FindControl("btnDelete") as Button;
            
            HiddenField hf=gvReply.Rows[i].FindControl("hfID") as HiddenField;
            
            if (Session["userid"].ToString() == hf.Value)
            {
               btnDelete.Visible = true;
              
            }
        }
    } 


it is the example of a Button control , instead you can control the property of checkbox also.
 
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