I need to color some of US counties with specific colors.
Ideally some kind of "heat map" (meaning different tints of the same color depending on the number supplied. Bigger number results in deeper color tint).
Not sure how to approach this task.
Thank you
Hi there,
I am building an App which reads data from a table and populates using a heirarchicaldataset class.
This works fine in the standard Ajax Treeview but I am struggling with the limitations of this control.
The data populates perfectly ok, but I need to conditionally add up to 5 icons to the node text on the LHS and even one or two on the RHS. I will need to have these potentially firing off functions in Javascript and/or code behind.
But I do not want to have to manage the node population in code, once I have populated my datasource I want the treeview to display with a minimal amount of fuss. I want to set up indicators in my data structure to say which icons appear and also to have checkbox for selection on the LHS.
The documentation/demo online does not seem to happily or simply support population from a dataset directly which is why I chose to use the standard asp treeview.
Does RadTreeview support node population via a heirarchicaldataset (recursive dataset) method and does it support a templated node layout?
I was thinking of a layout with a number of TD's ..
I can't see examples of this sort of thing on the demos pages.
jON
I would like to add pie-chart to one of the sub levels. Ideally i would like to add tab control with multiple charts.
i tried bunch of stuff with no luck
Please take a look at the current state (before.jpg) and desired (after.png)
Thank you
I am simply trying to display a value from asp.net label control, the value is setting from the code behind. But I could not find any good example. Either telerik told me that this is not possible or give me a good example. Please note that if I set the text in the markup it works but setting its value from the code behind does not work.
I am opening a popup from jquery to display the label control.
<telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Resize, Close"
Modal="True" ShowContentDuringLoad="False" VisibleStatusbar="False" AutoSize="False"
Width="455" ReloadOnShow="True" Height="260" Title="Opening Balance">
<ContentTemplate>
<asp:Panel ID="Panel​1" runat="server">
<table class="margin-all-10">
<tr>
<td class="label">
Bank: <asp:Label ID="lblLabel1" Text="" runat="server"></asp:Label>
.....
Protected Sub AddBegBalance_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
lblLabel1.Text = "Some Text"
ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType, "alert1", "Display();", True)
End Sub​
<script language="javascript" type="text/javascript">
function ShowModifyAddBalan() {
var _wndwAddOpenBalan = $find("<%= RadWindow1.ClientID %>");
_wndwAddOpenBalan.show();
}​
</script>
Hi!
I use <telerik:RadGrid>, <BatchEditingSettings EditType="Row" OpenEditingEvent="DblClick" /> for data editing,
My problem is when the saveChanges button being clicked, It triggered - BatchEditCommand(object sender, Telerik.Web.UI.GridBatchEditingEventArgs e) event, however, (I referenced from searched samples) when trying to loop through and get data within the grid:
foreach (GridBatchEditingCommand gridBECmd in e.Commands)
{}
the e.Commands.count is always 0, therefore, I couldn't get data to save.
Can anyone give any advises?
thanks!
Sharon
Hi,
We would like to enable the spell check in the textboxes. But, we want to have only spell check as menu, while right click on the word.
We dont want any other options like - cut, copy, paste, Inspect element, etc.
Please let me know, how to do this.
I have an application that contains several radwindows with the modal setting turned on. When I run the application standalone, the radwindow opens up in the correct position, centered on the screen.
However, when I call my application from inside a menu application the radwindow opens up relative to the frame and not to the browser. This requires the user to scroll halfway down the page to locate the radwindow where they have to input information. It's not even obvious to the user that a window had opened up.
Is there anyway to get it to automatically center in the window at the position they clicked the icon which launches the radwindow, the same way it does when not being called from menu application?
Any help is greatly appreciated!
I only discovered this after finally realising that a drag/drop between RADTreeviews does not seem to work when the views are databound so I am not even sure if I can use this component.
After spending some time stylising and getting a data bound treeview working, drag and drop seems to lock up and stop working after one operation.
To my dismay I discovered articles suggesting that drag and drop is not supported for data bound views but I was convinced that this error was a side issue.
When I drag from one treeview to another on the same page and both in the same UpdatePanel, in the Chrome Developer window I see an error caused inside what appears to be Ajax scripts
"Uncaught Sys.ArgumentTypeException: Sys.ArgumentTypeException: Object of type 'Telerik.Web.UI.RadTreeView' cannot be converted to type 'Sys.UI.Control'." Parameter name: instance
To see whether the problem was related to drag/drop in a databound treeview I stripped out all the code and data bindings and created a simple page like this:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TVTest.aspx.vb" Inherits="JobManager_TVTest" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<
script
type
=
"text/javascript"
src
=
"../Scripts/Onsite.debug.js"
></
script
>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form2"
runat
=
"server"
>
<
asp:UpdatePanel
ID
=
"UpdatePanel1"
runat
=
"server"
>
<
ContentTemplate
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
div
id
=
"ExplorerWindow"
style
=
"border: solid 1px silver; width:48%; float:left"
>
<
table
ID
=
"Maintable"
runat
=
"server"
style
=
"width:100%; border-spacing:0px"
>
<
tr
id
=
"DisplayRow"
>
<
td
style
=
"width:300px; vertical-align:top; margin:2px; padding:10px"
>
<
telerik:radtreeview
id
=
"RadTreeView"
runat
=
"server"
style
=
"overflow:auto;"
EnableDragAndDrop
=
"True"
OnClientNodeClicked
=
"onClientNodeClicked"
OnNodeDrop
=
"RadTreeView1_NodeDrop"
DataFieldParentID
=
"ParentID"
ResolvedRenderMode
=
"Classic"
>
<
NodeTemplate
>
<
div
>
<
img
src
=
"../Images/16 x 16/Complete.bmp"
alt
=
""
style
=
"border-width:0px;"
>
<
asp:CheckBox
ID
=
"CheckBox1"
runat
=
"server"
/>
</
div
>
</
NodeTemplate
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Root RadTreeNode1"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Child RadTreeNode 2"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Child RadTreeNode 3"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Child RadTreeNode 4"
>
<
NodeTemplate
>
four
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
<
NodeTemplate
>
three
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
<
NodeTemplate
>
two
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
<
NodeTemplate
>
one
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
</
telerik:radtreeview
>
</
td
>
<
td
style
=
"vertical-align:top; padding:10px"
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
div
id
=
"Div1"
style
=
"border: solid 1px silver; width:50%; float:right"
>
<
table
ID
=
"Table1"
runat
=
"server"
style
=
"width:100%; border-spacing:0px"
>
<
tr
id
=
"Tr1"
>
<
td
style
=
"width:300px; vertical-align:top; margin:2px; padding:10px"
>
<
telerik:radtreeview
id
=
"RadTreeView1"
runat
=
"server"
style
=
"overflow:auto;"
EnableDragAndDrop
=
"True"
OnClientNodeClicked
=
"onClientNodeClicked"
OnNodeDrop
=
"RadTreeView1_NodeDrop"
DataFieldParentID
=
"ParentID"
ResolvedRenderMode
=
"Classic"
EnableDragAndDropBetweenNodes
=
"True"
>
<
NodeTemplate
>
<
div
>
<
img
src
=
"../Images/16 x 16/Complete.bmp"
alt
=
""
style
=
"border-width:0px;"
>
<
asp:CheckBox
ID
=
"CheckBox1"
runat
=
"server"
/>
</
div
>
</
NodeTemplate
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Root RadTreeNode1"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Child RadTreeNode 2"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Child 3"
>
<
Nodes
>
<
telerik:RadTreeNode
runat
=
"server"
Text
=
"Child 4"
>
<
NodeTemplate
>
five
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
<
NodeTemplate
>
six
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
<
NodeTemplate
>
seven
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
<
NodeTemplate
>
eight
</
NodeTemplate
>
</
telerik:RadTreeNode
>
</
Nodes
>
</
telerik:radtreeview
>
</
td
>
<
td
style
=
"vertical-align:top; padding:10px"
>
</
td
>
</
tr
>
</
table
>
</
div
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
form
>
</
body
>
</
html
>
<
script
type
=
"text/javascript"
>
function pageLoad() {
treeExpandAllNodes()
}
function treeExpandAllNodes() {
var treeView = $find("<%= RadTreeView.ClientID %>");
if (treeView) {
var nodes = treeView.get_allNodes();
for (var i = 0; i <
nodes.length
; i++) {
if (nodes[i].get_nodes() != null) {
nodes[i].expand();
}
}
}
}
function treeCollapseAllNodes() {
var treeView = $find("<%= RadTreeView.ClientID %>");
var nodes = treeView.get_allNodes();
for (var i = 0; i <
nodes.length
; i++) {
if (nodes[i].get_nodes() != null) {
nodes[i].collapse();
}
}
}
function onClientNodeClicked(treeView, e) {
var
node
= e.get_node();
// if (!node.get_expanded()) {
node.toggle();
}
</script>
and code behind is just this:
Protected Sub RadTreeView1_NodeDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeDragDropEventArgs)
For Each node As RadTreeNode In e.DraggedNodes
e.DestDragNode.Nodes.Add(node)
Next
End Sub
If I drag one item then not only does the node not move but the Javascript error causes all future drag attempts to do nothing.
I updated to the latest Telerik version today and that made no difference.
I and using .net 4.0
can anyone see what I am doing wrong here?
thanks
jON
I'm trying to configure a RadEditor with minimal set of toolbar tools. Thus, expecting a lighweight page HTML being downloaded to browser (as promised ;).
I have created the FileTools.xml and set RenderMode="Lightweight". However, two issues remain when checking the page source after load:
1. _dialogDefinitions
$create(Telerik.Web.UI.RadDialogOpener, {"_dialogDefinitions":{"ImageManager":{"SerializedParameters":"LzFXSAgfHwImDDtQAS8KCjAMf2pqbFF1CWkJNh0fUiQAYCF9MxJ2ER0dJCUSd097JAtDQQgZIgwIeyt+ASAGNwsMIgtpYzZ1BnkJNRoLRho5Vj1EGg51DgZAMD0qY2EMJwp5UzYNPQEIeQ1TPyAVPR99PW1kbCJxCnkBMxtAeCQIVQdbDBx6DSwdNyIaSXFPHm5uSB8ZIgIJew4eFjMBeQBpfzJpVhwpDXkNdRsfcBk5fxNeDx1lDhsdJCIrFmJPMCVDbjEkAxcLDydCORokfwtpLjZ8fj4tPmkNLDU2fzwNVAgYM...
... etc.
It appears ALL definitions are included, i.e. ImageManager, DocumentManager,LinkManager,ImageEditor, etc. in the page HTML - despite the fact that there are no dialogs on the toolbar. In fact, my test toolbar contains only one button - "Bold".
Would it be possible to keep such definitions in a separate xml file or something, i.e. not to load into browser with each request? How to get rid of these huge and heavy json definitions?
2. _localization strings
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadEditor, {"_localization":{"addcustomcolor":"Add Custom Color...","addcustomhexcolor":"Add Hex Color...","addcustomwordsuccess":"successfully added to dictionary","addtodictionary":"Add to dictionary","askwordcleaning":"The content you are trying to paste has MS Word formatting.\r\nWould you like to clean
I wonder why are these strings are included with every single page load? A common sense says that at least English strings should be built into the telerik dll.
...
Many thanks for hints how to optimize RadEditor so thate there will be no obsolete JSON stuff on page HTML.
cheers,
Armin