jas spiegeal

jas spiegeal

  • NA
  • 3
  • 4.5k

Visibility in web control

Nov 17 2011 12:14 AM
I am wondering how I could modify the code listed below to hide or show individual rows in a detailsview control. Basically all the textbox rwos will be set

to invisible. However when a user selects a dropdown list control to say display the edititable version of the textbox cell, that is when I want to set the visible proerty to trure.

if (DetailsView1.CurrentMode == DetailsViewMode.ReadOnly)
  {
  DetailsView1.FindControl("TextBoxAttid")).visibility="true";
  }
  else if (DetailsView1.CurrentMode == DetailsViewMode.Edit)
  {
  DetailsView1.FindControl("TextBoxAttid")).visibility="true";

  }
What do you think would be the best way to accomplish this goal?