I know - 2007 is outdated - but I can't switch to the newer controls at the moment.
I've figured out that the TreeView is not showing properly in IE8 because of an internal function:
RadTreeView.AlignImage=function(_4e){
_4e.align="absmiddle";
_4e.style.display="inline";
if(!document.all||window.opera){
if(_4e.nextSibling&&_4e.nextSibling.tagName=="SP开发者_如何学PythonAN"){
_4e.nextSibling.style.verticalAlign="middle";
}
if(_4e.nextSibling&&_4e.nextSibling.tagName=="INPUT"){
_4e.nextSibling.style.verticalAlign="middle";
}
The fix would be:
RadTreeView.AlignImage=function(_4e){
_4e.align="middle";
_4e.style.display="inline";
if(!document.all||window.opera){
if(_4e.nextSibling&&_4e.nextSibling.tagName=="SPAN"){
_4e.nextSibling.style.verticalAlign="middle";
}
if(_4e.nextSibling&&_4e.nextSibling.tagName=="INPUT"){
_4e.nextSibling.style.verticalAlign="middle";
}
Edit: It seems to be used as absMiddle in the .NET assembly too. The above functions are javascript functions.
But how can I change this in the compiled dll? Is there any way to fix that in the dll?
Do I need to use code reflection? Or is there any workaround to override the AlignImage function?
Edit
A quick and dirty fix is setting a css (Edit2: this fixes the treeview - but might cause ohter issues with input and img html elements)
input
{
vertical-align: middle!important;
}
img
{
vertical-align: middle!important;
}
Andreas, I would jump to the Telerik AJAX treeview because I know it supports IE8 fully and will support IE9 when it is released. For the old treeview you should either use workarounds or set IE7 compatibility mode to make sure it will be rendered properly.
精彩评论