Dear Sir:
I have a radgrid and there is some tooltips inside the grid. i tried to use the tooltip manager for the tooltip but i found the performance is not satisfy when there are a lot of tooltips needed. Now, i changed to load the tooptip by javascript (sample on below) . Everything seem fine except the width and height, the tooltips seem cannot automatically change the tooltips width and height, i also tried to use the auto scrollbar but the scrollbar didn't show up. how can I pass the tooltip's width and height to the tooltip manager and it will resize/show scrollbar to the tooltip. is there any sample which i can follow?
i got some hints from other post with property (OnClientBeforeShow, OnClientShow) to change the size but i cannot make it work.
thks
From CH
I have a radgrid and there is some tooltips inside the grid. i tried to use the tooltip manager for the tooltip but i found the performance is not satisfy when there are a lot of tooltips needed. Now, i changed to load the tooptip by javascript (sample on below) . Everything seem fine except the width and height, the tooltips seem cannot automatically change the tooltips width and height, i also tried to use the auto scrollbar but the scrollbar didn't show up. how can I pass the tooltip's width and height to the tooltip manager and it will resize/show scrollbar to the tooltip. is there any sample which i can follow?
i got some hints from other post with property (OnClientBeforeShow, OnClientShow) to change the size but i cannot make it work.
thks
From CH
function GetXMLObject() { var xmlhttp=false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp) return null; else return xmlhttp; }function ShowTooltip(sender, manager, url) { if (manager != null) { var tooltip = manager.getToolTipByElement(sender); if (!tooltip) { tooltip = manager.createToolTip(sender); } if (xmlRequest != null) xmlRequest.Abort(); xmlRequest = GetXMLObject(); tooltip.show(); var contentElement = document.createElement('div'); contentElement.innerHTML = "<img src='../../images/loading7.gif' />"; tooltip.set_contentElement(contentElement); if (xmlRequest != null) { xmlRequest.open("GET", url, true); xmlRequest.onreadystatechange = function () { if (xmlRequest.readyState == 4) { if (xmlRequest.status == 200) { tooltip.hide(); contentElement = document.createElement('div'); contentElement.innerHTML = xmlRequest.ResponseText; if (contentElement.outerText.length < 10) contentElement.style.width = "100px"; tooltip.set_contentElement(contentElement); tooltip.show(); } } } } xmlRequest.send(null); }