Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
62 views
I am working on a page that uses the lightbox, and I noticed that the left/right buttons only show up when the mouse if hovered on them. Our web page will be used by mobile devices and other systems with touch-screens which do not have the ability to hover. Is there a way to make the left/right buttons always visible?
Galin
Telerik team
 answered on 15 Sep 2014
1 answer
91 views
I've written an application that uses RadMap to display GeoJson shape data for the individual counties in a selected State in the USA. 
In ANY other browser (Chrome, Safari, FireFox) the RadMap is displayed perfectly.  In IE (Any version) the radmap navigation is displayed but the map is completely empty.   I'm at my wits end trying to troubleshoot this and would appreciate any help anyone can give me. 
I've included the aspx relating to the radmap as well as the associated js file text. 
 
<telerik:RadMap runat="server" ID="RadMap1" Zoom="6" Width="100%" Height="500" Skin="MetroTouch" >
<CenterSettings Latitude="40" Longitude="-100" />
<LayerDefaultsSettings>
<ShapeSettings>
    <StyleSettings>
 <FillSettings Color="DarkBlue " Opacity="1" />
<StrokeSettings Color="White" />
</StyleSettings>
</ShapeSettings>
</LayerDefaultsSettings>
<ClientEvents OnShapeCreated="shapeCreated" OnShapeMouseEnter="shapeMouseEnter"
OnShapeClick="shapeClick" OnShapeMouseLeave="shapeMouseLeave" OnClick="clientClick" />
<LayersCollection>
<telerik:MapLayer ClientDataSourceID="RadClientDataSource1" Type="Shape" Opacity="1">
</telerik:MapLayer>
                </LayersCollection>

</telerik:RadMap>

---- Script.js ----
var HIGHLIGHT_STROKE_COLOR = "Red";
var HIGHLIGHT_STROKE_HOVER_COLOR = "Green";
var COUNTRIES_COLOR = "DarkBlue";
var COUNTRIES_STROKE_COLOR = "White";

function shapeCreated(e) {

if (e.shape.dataItem.properties["GEO_ID"].substring(0, 2) === '05') {
if (e.shape.dataItem.properties["STATE"] === getParameterByName("ID")) {

var COUNTY_NAME = e.shape.dataItem.properties["NAME"];
var COUNTIES_COLOR = getcountycolor(e.shape.dataItem.properties["NAME"]);

e.shape.options.set("fill.color", COUNTIES_COLOR);
e.shape.options.set("stroke.color", COUNTRIES_STROKE_COLOR);
e.shape.innerHTML = e.shape.dataItem.properties["NAME"];

}
else { e.shape.options.set("visible", false); }
}


}

function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
function shapeMouseEnter(e) {
document.getElementById("lblShapeName").innerHTML = e.shape.dataItem.properties["NAME"];
e.shape.options.set("fill.color", HIGHLIGHT_STROKE_COLOR);
e.shape.options.set("stroke.color", HILIGHT_STROKE_COLOR);

e.shape.toolTip.set(e.shape.dataItem.properties["NAME"]);


}

function shapeMouseLeave(e) {

e.shape.options.set("fill.color",COUNTRIES_COLOR);
e.shape.options.set("stroke.color", COUNTRIES_STROKE_COLOR);
}

function shapeClick(e) {

if (e.shape.dataItem.properties["GEO_ID"].substring(0,2) === '05')
{
var County = e.shape.dataItem.properties['NAME'];
var state = getParameterByName("state");
window.location = "http://olaagenthub.onelifeamerica.com/OrderLeadsCounties.aspx?County=" + County + "&state="+state+"&ID=" + e.shape.dataItem.properties['STATE'];
}
else{
var state = e.shape.dataItem.properties['NAME'];
window.location = "http://olaagenthub.onelifeamerica.com/OrderLeadsCounties.aspx?state="+state+"&ID="+e.shape.dataItem.properties['STATE'];
}


}



function markerCreated(e) {
e.preventDefault();
}

function clientClick(e) {
toolTip.hide();
}

function clientPan(e) {
toolTip.hide();
}

function zoomStart(e) {
toolTip.hide();
}



function buildToolTipFromShape(shape, div) {

div.innerHTML = "<div><span class='detail'>Name: </span><span>" + shape.dataitem.properties["NAME"] + "</span></div>"

}

function getColorFromMagnitude(magnitude) {
return interpolateColor(magnitude, 3, 7, 255, 255, 0, 240, 0, 0);
}

function interpolateColor(value, minimum, maximum, R1, G1, B1, R2, G2, B2) {
value = value > maximum ? maximum : value;
value = value < minimum ? minimum : value;
value = value - minimum;
var percent = value / (maximum - minimum);

var r1 = R1 / 255.0, g1 = G1 / 255.0, b1 = B1 / 255.0;
var r2 = R2 / 255.0, g2 = G2 / 255.0, b2 = B2 / 255.0;

var r3 = (r1 + (r2 - r1) * percent) * 255;
var g3 = (g1 + (g2 - g1) * percent) * 255;
var b3 = (b1 + (b2 - b1) * percent) * 255;
return rgb2hex(r3, g3, b3);
}

function rgb2hex(red, green, blue) {
var rgb = blue | (green << 8) | (red << 16);
return '#' + (0x1000000 + rgb).toString(16).slice(1)
}
Vessy
Telerik team
 answered on 15 Sep 2014
5 answers
123 views
I would like to see some extra intelligence in the various Telerik drop-down controls, so that they avoid opening the drop-downs beyond the edges of the browser canvas.  Ideally, the behavior would be similar to the way drop-down boxes avoid crossing the edges of the screen in native windows applications.

In my case, I have RadToolBarSplitButton controls in multiple locations on the page, including close to the bottom of the page, and close to the right-hand edge of the page.  I am using the default ExpandDirection of Down.  This is a problem for the controls near the bottom of the page, because some of the drop-down items are rendered below the bottom edge of the browser window.  I am using EnableDefaultButton = false, and the text for some of the items is longer than the text on the RadToolBarSplitButton.  This is a problem for the controls near the right-hand edge of the page, because some of the drop-down is rendered beyond the right-hand edge of the browser window.  In both cases, the browser scroll bars extend to provide access to the rendered content beyond the previous edges of the canvas, but as soon as you click in the scroll bar to see the rest of the drop-down, the drop-down loses focus and collapses.

I am currently using the following javascript as a work-around, making use of the RadToolBar OnClientDropDownOpening and OnClientDropDownOpened events.
var canvasWidth, canvasHeight; 
       
function OnClientDropDownOpening(sender, args) { 
// We need to obtain the canvas width and height before the drop-down causes the canvas to expand. 
    canvasWidth = document.documentElement.scrollWidth; 
    canvasHeight = document.documentElement.scrollHeight; 
 
function OnClientDropDownOpened(sender, args) { 
    var button = args.get_item(); 
    var buttonElem = button.get_element(); 
    var dropDownContainer = button.get_dropDownElement().offsetParent; 
 
    var offsetRight = dropDownContainer.offsetLeft + dropDownContainer.offsetWidth; 
    if (canvasWidth < offsetRight) 
        dropDownContainer.style.left = (dropDownContainer.offsetLeft - offsetRight + canvasWidth) + "px"
 
    if (canvasHeight < dropDownContainer.offsetTop + dropDownContainer.offsetHeight) 
        dropDownContainer.style.top = (dropDownContainer.offsetTop - dropDownContainer.offsetHeight - buttonElem.offsetHeight) + "px"

The expand and collapse animations still think the drop-down is expanding down rather than up, so I have disabled the animations.  If you attempt to use the undocumented set_expandDirection client method to adjust the animation, you will notice that there is an infinite recursion bug in this method in RadToolBarScripts.js.
set_expandDirection:function(){if(this.set_expandDirection()==value){return
That's obviously meant to be get_expandDirection() in the if statement.

I am using RadControls for ASP.NET AJAX Q1 2010, with an assembly version of 2010.1.309.35.
Boyan Dimitrov
Telerik team
 answered on 15 Sep 2014
3 answers
116 views


IE 11 for windows was recently released for windows 7, while checking our site for problems we are seeing the same issues as this example. The vertical panel tabs have been shortened, chopping off text



http://demos.telerik.com/aspnet-ajax/splitter/examples/sp_firstlook/defaultcs.aspx



Vessy
Telerik team
 answered on 15 Sep 2014
2 answers
93 views
Our pivot grid is using OLAP settings bound to a data-cube.  I need to grab a handle on the SelectedIndexChanged event in the filter window's SetOptions; "Includes/Excludes".

I have tried the traditional mechanisms to wire the event during the FilterBox's Pre_Render event:

filterWindow.SetOptions.SelectedIndexChanged += SetOptions_SelectedIndexChanged;  

However, I can not get the event to fire.  Could I get some help?
Angel Petrov
Telerik team
 answered on 15 Sep 2014
4 answers
166 views
I have a usercontrol, categoryTree, for which I want to save it's state (namely whether checkboxes in a RadTreeView are checked) across sessions. So I have added this to the main page:

<telerik:RadPersistenceManager ID="RadPersistenceManager1" runat="server">
    </telerik:RadPersistenceManager>

And this to categoryTree.aspx:

​<telerik:RadPersistenceManagerProxy ID="RadPersistenceManagerProxy1" runat="server">
    <PersistenceSettings>
        <telerik:PersistenceSetting ControlID="RadTreeView1" />
    </PersistenceSettings>
</telerik:RadPersistenceManagerProxy>

And this to the codebehind:

private RadPersistenceManager _persistenceManager;

protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            _persistenceManager = RadPersistenceManager.GetCurrent(Page);
            if (!IsPostBack)
                _persistenceManager.LoadState();
        }


(and in the event for checked nodes):

_persistenceManager.SaveState();

But after I restart the page, the previous state does not get loaded. What am I missing?
C
Top achievements
Rank 1
 answered on 15 Sep 2014
1 answer
615 views
I am working on OrgChart tool. I need to create an Org Chart Horizontally and Vertically.
 
Scenario:
 - One parent node (Parent)
 - 8 nodes under parent. These 8 nodes should be horizontal. (Child nodes)
 - Each of these nodes has 10 nodes. These nodes have to be vertical. This saves space. (Grand Child nodes)
 - Printing functionality or saving functionality.
 
Please see the screenshot image of my desired ouput.
 
Regards,
 Keshab
Boyan Dimitrov
Telerik team
 answered on 15 Sep 2014
1 answer
42 views
In the OnClientCommandExecuting function, I know I can select all text by doing:

editor.fire("SelectAll");

How can I cause no text to be selected?
Danail Vasilev
Telerik team
 answered on 15 Sep 2014
2 answers
75 views
Hello,

I'm having problem to change the Radeditor toolbar dynamically in the Client script after aspx page load. I would like to load the different toolbar for the Radeditor on the fly depending on different user context selection so that the toolbar would have different function buttons available. I execute the following JavaScript code but the toolbar buttons do not reflect what I defined in the toolsfile xml file.  Do I need to call other client api to force reload the toolbar file?

launchEditor: function (editor, title) {

  if (title = 'Dsplay Name') {
     editor.ToosFile = "~/Toolbar/DisplayNameToobar.xml";
  } else if (title = 'FootNote') {
     editor.ToosFile = "~/Toolbar/FootNoteToobar.xml";
  } else {
     editor.ToosFile = "~/Toolbar/MiscToobar.xml";
  } 

},

Thanks,
Chuck


 
Danail Vasilev
Telerik team
 answered on 15 Sep 2014
1 answer
132 views
Hi,

I know you probably won't have an answer or resolution for me, but perhaps you can give me some ideas...

We are using version 2014.2.724.40 of your AJAX controls for ASP.NET.

I am using the old RadUpload and the RadProgressArea and RadProgressManager.  This was all working fine (the progressarea displayed fine), until we added a web application firewall (FortiWeb) device in front of our web server.

The web application firewall allows us to do virus scanning on the uploaded files, before the file upload process even begins.

As soon as I turned that feature on in our web application firewall, the ProgressArea no longer is being displayed during an upload.  It appears that the web application firewall maybe "breaks something" in the communication between the server and the client, during the upload process.

I don't expect you to solve that, but could you:
1.  Give me some ideas to possible troubleshoot this, or
2.  Give me some ideas on how to create some type of custom solution to display something to the users when the file is uploading?

I see that there is a onclientprogressstarted client even on the progressmanager, but I don't see a "onclientprogressended" event.  Without and "end" event, how would I know the file upload process is complete?  In other words, I know I could use the progressstarted client side event to display an animated icon or a modal div or something to the user when the upload has started.  But how would I know when the upload has ended so that I can hide whatever it is that I display?

Thanks,
Michael

Peter Filipov
Telerik team
 answered on 15 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?