I am trying to allow certain users to view data that is 'standard' and edit it..... conditionally when it is non-standard I just want to show the data as table data within the table. I am trying to conditionally display either static text or a drop-down list box. I am not sure if this is heading in the right direction or whether I should be trying to do something in the itemcreated event... and where to go from here. Any help would be greatly appreciated....TIA
aspx.page
<td colspan="2">
<%# GetControl(DataBinder.Eval(Container.DataItem,"base_task_stnd_ind")%>
</td>
codebehind...
public string GetControl(object stnd_ind)
{
if((bool)stnd_ind == true)
return "<aspropDownList id='ddl_entity_type' runat='server' DataSource='<%# myDataSet %>' DataMember='EntityType' DataTextField='entity_type_desc' DataValueField='entity_type_no' Width='160px' />";
else
return "<%#DataBinder.EvalContainer.DataItem,'entity_type_desc')%>";
}
aspx.page
<td colspan="2">
<%# GetControl(DataBinder.Eval(Container.DataItem,"base_task_stnd_ind")%>
</td>
codebehind...
public string GetControl(object stnd_ind)
{
if((bool)stnd_ind == true)
return "<aspropDownList id='ddl_entity_type' runat='server' DataSource='<%# myDataSet %>' DataMember='EntityType' DataTextField='entity_type_desc' DataValueField='entity_type_no' Width='160px' />";
else
return "<%#DataBinder.EvalContainer.DataItem,'entity_type_desc')%>";
}