I did find that I can do the <div id=name visible=false runat="server">. I
needed to do this instead of making each object invisible as the datalist
control has html table/tr/td code in it that would still be visible.
The problem is that if I use the div and make it invisible, I seem to lose
the other object forever. I tried to make the div visible (which works
fine), but the objects (grid, labels etc) are not there.
Here is the control tree from my trace.warn:
****************************************************
DataList1System.Web.UI.WebControls.DataList113976
DataList1:_ctl0System.Web.UI.WebControls.DataListItem290
DataList1:_ctl0:_ctl0System.Web.UI.LiteralControl100
DataList1:_ctl0:dataListItemDivSystem.Web.UI.HtmlControls.HtmlGenericControl032
DataList1:_ctl0:_ctl1System.Web.UI.LiteralControl00
DataList1:_ctl0:ExpandButtonSystem.Web.UI.WebControls.ImageButton00
DataList1:_ctl0:_ctl2System.Web.UI.LiteralControl00
DataList1:_ctl0:CollapseButtonSystem.Web.UI.WebControls.ImageButton00
DataList1:_ctl0:_ctl3System.Web.UI.LiteralControl00
DataList1:_ctl0
ositionIDSystem.Web.UI.WebControls.Label032
DataList1:_ctl0:_ctl4System.Web.UI.LiteralControl00
DataList1:_ctl0:QuestionUniqueSystem.Web.UI.WebControls.Label028
DataList1:_ctl0:_ctl5System.Web.UI.LiteralControl00
DataList1:_ctl0:QuestionTypeSystem.Web.UI.WebControls.Label032
DataList1:_ctl0:_ctl6System.Web.UI.LiteralControl00
DataList1:_ctl0:QuestionSystem.Web.UI.WebControls.Label084
DataList1:_ctl0:_ctl7System.Web.UI.LiteralControl00
DataList1:_ctl0
ataGrid1System.Web.UI.WebControls.DataGrid0136
DataList1:_ctl0:dataGridBrSystem.Web.UI.HtmlControls.HtmlGenericControl00
DataList1:_ctl0:_ctl8System.Web.UI.LiteralControl00
DataList1:_ctl0:submitQuestionSystem.Web.UI.WebControls.Button00
DataList1:_ctl0:_ctl9System.Web.UI.LiteralControl00
DataList1:_ctl0:_ctl10System.Web.UI.LiteralControl190
DataList1:_ctl1System.Web.UI.WebControls.DataListItem190
DataList1:_ctl1:_ctl1System.Web.UI.LiteralControl100
DataList1:_ctl1:_ctl0System.Web.UI.HtmlControls.HtmlGenericControl00
DataList1:_ctl1:_ctl2System.Web.UI.LiteralControl90
DataList1:_ctl2System.Web.UI.WebControls.DataListItem290
DataList1:_ctl2:_ctl0System.Web.UI.LiteralControl100
DataList1:_ctl2:dataListItemDivSystem.Web.UI.HtmlControls.HtmlGenericControl032
DataList1:_ctl2:_ctl1System.Web.UI.LiteralControl00
DataList1:_ctl2:ExpandButtonSystem.Web.UI.WebControls.ImageButton00
DataList1:_ctl2:_ctl2System.Web.UI.LiteralControl00
DataList1:_ctl2:CollapseButtonSystem.Web.UI.WebControls.ImageButton00
DataList1:_ctl2:_ctl3System.Web.UI.LiteralControl00
DataList1:_ctl2
ositionIDSystem.Web.UI.WebControls.Label032
DataList1:_ctl2:_ctl4System.Web.UI.LiteralControl00
DataList1:_ctl2:QuestionUniqueSystem.Web.UI.WebControls.Label028
DataList1:_ctl2:_ctl5System.Web.UI.LiteralControl00
DataList1:_ctl2:QuestionTypeSystem.Web.UI.WebControls.Label032
DataList1:_ctl2:_ctl6System.Web.UI.LiteralControl00
DataList1:_ctl2:QuestionSystem.Web.UI.WebControls.Label060
DataList1:_ctl2:_ctl7System.Web.UI.LiteralControl00
DataList1:_ctl2
ataGrid1System.Web.UI.WebControls.DataGrid0136
DataList1:_ctl2:dataGridBrSystem.Web.UI.HtmlControls.HtmlGenericControl00
DataList1:_ctl2:_ctl8System.Web.UI.LiteralControl00
DataList1:_ctl2:submitQuestionSystem.Web.UI.WebControls.Button00
DataList1:_ctl2:_ctl9System.Web.UI.LiteralControl00
DataList1:_ctl2:_ctl10System.Web.UI.LiteralControl190
DataList1:_ctl3System.Web.UI.WebControls.DataListItem190
DataList1:_ctl3:_ctl1System.Web.UI.LiteralControl100
DataList1:_ctl3:_ctl0System.Web.UI.HtmlControls.HtmlGenericControl00
DataList1:_ctl3:_ctl2System.Web.UI.LiteralControl90
**********************************************************************************
Every other datalistitems show the controls and the other only show 3
controls.(I think because of the AlternateRow).
This is after I set all the div to visible=true.
So obviously this is not going to work.
It would have been so easy had MS property worked correctly.
Tom