S
Sebastian Paul
Hi,
I registered a WebControlAdapter for any WebControl, that removes all
ID attributes (I actually do not need them). Everything works as
expected, but the DataList ignores any styles (ItemStyle,
SelectedItemStyle etc.). The DataList works as usual, i.e. it uses the
SelectedItemTemplate for the selected item.
Other controls, such as the TreeView, apply their styles properly.
Any idea what's going wrong? It seems like a bug for me. Currently,
the only workaround I see is to create a special adapter for the
DataGrid and render the table myself.
You can reproduce this by adding a .browser file like this:
<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.WebControl"
adapterType="System.Web.UI.WebControls.Adapters.WebControlAdapter" />
</controlAdapters>
</browser>
</browsers>
In that case, the base class for WebControlAdapters is used. It should
render the control as usual, shouldn't it?
Kind regards, Sebastian
I registered a WebControlAdapter for any WebControl, that removes all
ID attributes (I actually do not need them). Everything works as
expected, but the DataList ignores any styles (ItemStyle,
SelectedItemStyle etc.). The DataList works as usual, i.e. it uses the
SelectedItemTemplate for the selected item.
Other controls, such as the TreeView, apply their styles properly.
Any idea what's going wrong? It seems like a bug for me. Currently,
the only workaround I see is to create a special adapter for the
DataGrid and render the table myself.
You can reproduce this by adding a .browser file like this:
<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.WebControl"
adapterType="System.Web.UI.WebControls.Adapters.WebControlAdapter" />
</controlAdapters>
</browser>
</browsers>
In that case, the base class for WebControlAdapters is used. It should
render the control as usual, shouldn't it?
Kind regards, Sebastian