Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid/Label Invisible to Visible

Status
Not open for further replies.

jtgurkin

Technical User
Sep 16, 2002
47
US
I have set up a datagrid and in one of my columns i have a link button. I also have a label in that column.
I have set the label to "Visible=False" as default
I would like to know if anyone knows how to make the label for a given row to become visible based on a person clicking the link button in the same row.
 
Code:
    public void dgItems_Edit(Object sender, DataGridCommandEventArgs e)
    {
        dgItems.EditItemIndex = e.Item.ItemIndex;
        BindData();

        Label lDesc= (Label)dgItems.Items[e.Item.ItemIndex].Cells[8].FindControl("lblWhatever");
        
        lDesc.Visible = true;


    }

Cells[8] being the column index your label is in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top