Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
114 views
I am encountering a conflict between your Rating control (.NET/AJAX) and the Subgurim Google Map Control.  Both of the controls co-exist peacefully and work fine UNTIL I attempt to use the "OnClientRated" event on your Rating control.  When I try to use this event, the Subgurim control will NOT display a map.  I am been trying to isolate this issue for over an hour and have successfully (I believe) got this down to attempting to use the "OnClientRated" event.  I have not tried any other "OnClient..." events with the Rating control to see if they also have the same problem.

What happens is that the Subgurim control just doesn't display a map.  See screen captures attached.

Here is the code that prevents the map from being displayed:
<telerik:RadRating ID="AvgRatingValue" OnClientRated="OnClientxRated();" ReadOnly="true" runat="server" Visible="true" Precision="Half" EnableEmbeddedSkins="true" Skin="Default" ></telerik:RadRating>
 
    <script type="text/javascript">
        function OnClientxRated(sender, args) {
            alert('The rating value was updated');
        }
    </script>

The above code will prevent the map from displaying.  All I have to do to get the map to display is to remove the property on the Rating control OnClientRated="OnClientxRated();".  Then the map displays just fine.

Do you see any problems with the above code?

The Subgurim URL: http://en.googlemaps.subgurim.net/ .  This is a free control and I have had no other weird problems.  It is getting good reviews out there on the Internet.

Thanks in advance for any assistance! 

Lynn


Lynn
Top achievements
Rank 2
 answered on 30 May 2011
4 answers
194 views
I have a RadPanel that hosts a few items.  One of the items is a Help section where I am trying to simulate the standard help format with a Splitter showing two panels, a left and a right.  The left has a RadTreeView and the right has an asp:Literal control.

My plan is to load a hierarcy of help topics based on a URL that is recorded in the help table.  So the table has a ParentID column that will hold a value or not. This sets up the grouping of the tree view nodes
.
I also want to have JavaScript load the content of the selected help topic (RadTreeNode) into the literal control's text property when the node is clicked.  Researching it on this site had given me the JavaScript via a RadScript block to respond to click events, focus, etc.

This is a MVC application with a Master Page and the View is displaying an MVC user control that is wrapping the Help process.  So the RadPanelBar displays the help section item as a user control.  All the JavaScript and styles are in the UserControl markup.

So I am not able to do the following things in JavaScript:

  1. Get the Literal Control instance (this is nested in a RadPane.
  2. Get the RadTreeView instance.
  3. Get the selected node.
  4. Get the object databound to the node.
  5. Set the Text property of the Literal Control to the "Content" property of my help business object.

 

This is the only thing I have been successful with to get the Literal object...

function onNodeClicking(sender, args)
 {
    alert("OnClientNodeClicking: " + args.get_node().get_text()); <-- works
    var literalContent = $('#helpContentHolder');  <-- returns generic object, how to cast?            
    var tree = <%= ctrlHelpRadTreeView.ClientID %>;  <-- returns HTMLDivElement  ??
  }

All the client side events below are in place and working...

<telerik:RadTreeView ID="ctrlHelpRadTreeView" runat="server" CheckBoxes="True" AllowNodeEditing="True"
                EnableDragAndDrop="true" OnClientNodeClicking="onNodeClicking" OnClientNodeChecking="onNodeChecking"
                OnClientMouseOver="onMouseOver" OnClientMouseOut="onMouseOut" OnClientNodeEditStart="onEditStart"
                OnClientNodeEditing="onEditing" OnClientNodeEdited="onEdited" OnClientNodeDragStart="onNodeDragStart"
                OnClientNodeDropping="onNodeDropping" OnClientNodeExpanded="onNodeExpanded" OnClientNodeCollapsed="onNodeCollapsed"
                OnClientNodeAnimationEnd="onNodeAnimationEnd" OnClientLoad="onLoad" BeforeClientClick="BeforeClientClickHandler"  Width="100%" 
                Height="250px" Style="border: 1px solid #CBE7F5;">
     .........
</telerik:RadTreeView>

So the handler I am anticipating and have been working with is the OnNodeClicked.
Can anyone shed some light on how I get the literal and set it's text to the databound object in the TreeView?

The attached file shows how I am adapting it from a demo here on the site.  The TreeView is not databound at this time.  The image is intended to show the two panes side by side (again, inside the user control).  The Literal control is visible in the right panel inside the user control.

Thanks!

Reid

Reid
Top achievements
Rank 2
 answered on 30 May 2011
2 answers
101 views

Hi.

 

I know this is a general asp.net question, but I think it's very relavant here:

 

Is there a way to use <telerik:??? serverside controls in a jquery template.

 

Ex: A guestbook with comments to each entry.

 

If I create a set of nested templates for the messages and comments, I would like to use a "Comment" RadButton in the messages template so that each entry would have a "Comment" button. And.. maybe a rating control.

I just can't see how I can use anything but HTML.controls in my  templates.

Is there a solution to that.

Thanks
/Jesper

Jesper Krejberg Petersen
Top achievements
Rank 2
 answered on 30 May 2011
1 answer
67 views
My source of images in Sharepoint. Is there any link on how to get images from SP (with links, description)?
Niko
Telerik team
 answered on 30 May 2011
2 answers
321 views
Hi,

Lately I've been working on a user control to represent a week (Week User Control). This User Control contains, based on settings, 5, 6 or 7 days:
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • (optional Saturday)
  • (optional Sunday)
Each day itself is a User Control (Day User Control) too and includes a RadListView object.

In my Default.aspx I'm using the Week User Control, but for each day I would like to create an AjaxSetting. This AjaxSetting should have its AjaxControlID set to the RadListView object of the User Control. Why? I want to catch changes in the selection of the RadListView, so my RadRibbonBar (menu) can change its appearance. Whenever a user selects or deselects an item in a RadListView object my menu has to change its appearance (enable / disable specific buttons), but how can I accomplish this?

So, on my Default.aspx I have my RadRibbonBar object and Week User Control.
In my Week User Control (week.ascx) I have 5 to 7 Day User Controls (Monday till Friday/Saturday/Sunday).
In my Day User Control (day.ascx) I have the RadListView control which ID has to be set to the AjaxControlID in my Default.aspx.

Default.aspx:
<telerik:RadRibbonBar ID="Menu" runat="server">
  ...
</telerik:RadRibbonBar>
 
<telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" />
<telerik:RadAjaxManagerProxy ID="AjaxManager" runat="server">
  <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="??? RadListViewID of each Day user Control ???">
      <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="Menu" LoadingPanelID="LoadingPanel" />
      </UpdatedControls>
    </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManagerProxy>
 
<uc1:Week ID="Week" runat="server" OnActivitySelectionChanged="Week_SelectionChanged" />

Week User Control (week.ascx):
<uc1:Day ID="Sunday" runat="server" Day="Sunday" OnActivitySelectionChanged="OnActivitySelectionChanged" />
<uc1:Day ID="Monday" runat="server" Day="Sunday" OnActivitySelectionChanged="OnActivitySelectionChanged" />
<uc1:Day ID="Tuesday" runat="server" Day="Sunday" OnActivitySelectionChanged="OnActivitySelectionChanged" />
<uc1:Day ID="Wednesday" runat="server" Day="Sunday" OnActivitySelectionChanged="OnActivitySelectionChanged" />
<uc1:Day ID="Thursday" runat="server" Day="Sunday" OnActivitySelectionChanged="OnActivitySelectionChanged" />
<uc1:Day ID="Friday" runat="server" Day="Sunday" OnActivitySelectionChanged="OnActivitySelectionChanged" />
<uc1:Day ID="Saturday" runat="server" Day="Sunday" OnActivitySelectionChanged="OnActivitySelectionChanged" />

Day User Control (day.ascx):
<telerik:RadListView ID="lvDay" runat="server" onselectedindexchanged="lvDay_SelectedIndexChanged" AllowMultiItemSelection="true">
</telerik:RadListView>

The OnSelectedIndexChanged property "lvDay_SelectedIndexChanged" does the following to notify Week User Control and Default.aspx and eventually do something in the code-behind of Default.aspx in the "Week_SelectionChanged" event:
public event EventHandler ActivitySelectionChanged;
protected void OnActivitySelectionChanged(EventArgs e)
{
  if (ActivitySelectionChanged != null)
    ActivitySelectionChanged(this, e);
}
 
protected void DayListView_SelectedIndexChanged(object sender, EventArgs e)
{
  OnActivitySelectionChanged(e);
}

The Week_SelectionChanged event changes the appearance of the RadRibbonBar in Default.aspx.

Hopefully, you know a solution or workaround for my problem. The current solution is not eligible, because the page now postbacks after a (de)selection in a RadListView object in order to refresh the RadRibbonBar. But, I would like to only refresh the RadRibbonBar based on a (de)selection.

I'm looking forward to see your comments on this. Thanks in advance!

Regards,
Datamex
Datamex
Top achievements
Rank 2
 answered on 30 May 2011
1 answer
71 views
Hello,

I'm using an GridAttachmentColumn in my RadGrid according example: http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/gridattachmentcolumn/defaultcs.aspx

When click on the AttachmentColumn the error 'Can't find fireCommand' is raised on the following Javascript:
function onclick(event)
{
if(!$find('').fireCommand('DownloadAttachment','{"FileID":5,"ColumnUniqueName":"FileName","FileName":"Hydrangeas.jpg"}')) return false;
}

The problem is caused by $find('') I expect but how do I force that the right object is passend so it will perform like '$find('RadGrid')' ??

Anyone?

RvdGrint
Top achievements
Rank 1
 answered on 30 May 2011
7 answers
489 views
We are using the Telerik controls for our application. we are getting the following error when our application is idle for above 5 mins and do some server request.

Microsoft JScript runtime error:
Sys.WebForms.PageRequestManagerServerErrorException: An Unknown
error occured while processing the request on the server. The status code
returned from the server was: 12030


This error is occuring in the Telerik.Web.UI.... Please refer the screenshot attached for your reference.

Thanks in advance.
Iana Tsolova
Telerik team
 answered on 30 May 2011
1 answer
92 views
The attached .demonstration page gives an invalid character error when opening a radWindow from client script.

<%

 

@ Page Language="C#" AutoEventWireup="true" CodeBehind="ASPXPage1.aspx.cs" Inherits="LoadPlanner.ASPXPage1" %>

 

<!

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

 

<

 

 

html xmlns="http://www.w3.org/1999/xhtml">

 

 

<

 

 

head runat="server">

 

 

 

<title></title>

 

 

</

 

 

head>

 

 

<

 

 

body>

 

 

 

<form id="form1" runat="server">

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

 

</telerik:RadScriptManager>

 

 

 

<script type="text/jscript">

 

 

 

function menuClick(sender, eventArgs) {

 

 

 

 

var item = eventArgs.get_item();

 

 

 

 

var text = item.get_text();

 

 

 

 

switch (text) {

 

 

 

 

case "New":

 

 

 

 

// ask 'Save changes?', clear form

 

 

 

break;

 

 

 

 

case "Open ...":

 

 

 

 

// open file dialog in new window

 

OpenFileExplorerDialog();

 

 

break;

 

 

}

 

 

 

return false;

 

 

}

 

 

 

function OpenFileExplorerDialog() {

 

 

 

 

var wnd = $find("<%= ExplorerWindow.ClientID %>");

 

 

wnd.show();

 

}

 

 

 

 

 

</script>

 

 

 

<div id="pageContainer">

 

 

 

<!-- Page Header -->

 

 

 

<telerik:RadMenu ID="RadMenu2" runat="server" onclientitemclicked="menuClick">

 

 

 

<Items>

 

 

 

<telerik:RadMenuItem runat="server" Text="File">

 

 

 

<Items>

 

 

 

<telerik:RadMenuItem runat="server" Text="New">

 

 

 

</telerik:RadMenuItem>

 

 

 

<telerik:RadMenuItem runat="server" Text="Open ...">

 

 

 

</telerik:RadMenuItem>

 

 

 

</Items>

 

 

 

<GroupSettings Flow="Horizontal" />

 

 

 

</telerik:RadMenuItem>

 

 

 

</Items>

 

 

 

</telerik:RadMenu>

 

 

 

</div>

 

 

 

<telerik:RadWindow runat="server" Width="400px" Height="400px"

 

 

 

 

VisibleStatusbar="false" NavigateUrl="~/LoadPlans" ID="ExplorerWindow"

 

 

 

Modal="true" Behaviors="Close,Move" ViewStateMode="Disabled">

 

 

 

</telerik:RadWindow>

 

 

 

</form>

 

 

</

 

 

body>

 

 

</

 

 

html>

 


An extract of the relevant part of the automatically generated script file in which the error occurs is shown below

if

 

 

(this._dockMode){var k=$get(this.get_id()+"_C");

 

if

 

 

(k&&k.innerHTML){k.style.overflow="auto";

 

 

k.style.border=

 

"0px";

 

this

 

 

.set_contentElement(k);

 

this

 

 

.setWidthDockMode(this.get_width());

 

this

 

 

.setHeightDockMode(this.get_height());
///////////////////// my highlighting - offending statement shown in bold

 

 

}}

 

else{var o=($telerik.isIE)?document.createElement("<iframe name='"+c+"'>"):document.createElement("iframe");

 

 

o.name=c;

 

o.src=

 

"javascript:'<html></html>';";

 

 

o.style.width=

 

"100%";

 

 

o.style.height=

 

"100%";

 

 

o.style.border=

 

"0px";

 

 

o.frameBorder=

 

"0";

 



Rgds
Len Jones
Georgi Tunev
Telerik team
 answered on 30 May 2011
4 answers
334 views
Hi,
I have RadGrid in RadPane in scenario same like this demo: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=grid

When I put this code to Content Page (under Master Page), RadGrid will shrink itself, ignoring its Height=100% parameter. This problem is reproductable when:
  • RadGrid is in ContentPage
  • RadGrid is in RadPane
  • RadGrid's height is set to 100%
  • RadGrid's Scrolling is on (<Scrolling AllowScroll="true" UseStaticHeaders="true" />)
  • RadGrid is Ajaxified by RadAjaxManager (RadAjaxManagerProxy)

When I shut off Ajax, everything is fine. I have only one RadAjaxManager in MasterPage in ContentPages I use RadAjaxManagerProxy. I send sample as attachment,

Code:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
    <script type="text/javascript"
        function ClientResized(sender, eventArgs) { 
            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest('ChangePageSize'); 
        } 
    </script> 
         
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
 
    <telerik:RadSplitter ID="RadSplitter1" Width="100%" Height="100%" runat="server" Orientation="Horizontal" BorderSize="0" BorderStyle="None" PanesBorderSize="0" VisibleDuringInit="false"
        <telerik:RadPane ID="gridPane" runat="server"  Width="100%" Height="60%" Scrolling="None" OnClientResized="ClientResized">            
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" GridLines="None"  Width="100%" Height="100%" UseStaticHeaders="true"  Style="border: 0; outline: none"
            <ClientSettings><Scrolling AllowScroll="true" UseStaticHeaders="true" /></ClientSettings
            <MasterTableView> 
            </MasterTableView> 
        </telerik:RadGrid> 
        </telerik:RadPane> 
        <telerik:RadSplitBar CollapseMode="Both" ID="RadSplitBar2" runat="server" EnableResize="True"></telerik:RadSplitBar> 
        <telerik:RadPane ID="listBoxPane" runat="server" BackColor="#d9eeff"  Height="40%"
            Bottom Pane 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
</asp:Content> 


Thank you for help!
Pavlina
Telerik team
 answered on 30 May 2011
4 answers
84 views
hi all
I want design RadDock like SolutionExplorer window of VisualStudio .net
which move left & right not up&down and can fixed it position

please tell me how can I do that
samaneh
Top achievements
Rank 1
 answered on 30 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?