Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
145 views
Hey,

After rendering the code below:
_RadTreeNode.Attributes.Add("onclick", "func1('" + _Value + "')");

Looks like:
.. onclick="func1('SomeValue')" ..

apostrophe symbol encoded to ' and javascript crashes.

Thanks, for help.
Nikolay Tsenkov
Telerik team
 answered on 11 Aug 2011
2 answers
132 views
I am using RadGrid in VS2010 and populating it with JSON data from the clientside.
My page allows data entry in a traditional textfield manner and then assembles the data and performs an AJAX POST to store serverside. The page is then refreshed using a typical clientside JSON binding.
This all works well and I can have unlimted(?) number of json dataitems.

However, I need to reach inside and draw a dropdownbox for one of my cells/row.
This also works perfect until I reach the 12th row inside a foreach loop.
my javascript/clientside code is simple in that I have a loop with a counter.
inside the loop i use a RADGrid method (.getRowByIndex) to instantiate the client side object.
 ===============================================================================
var row = tableView._getRowByIndexOrItemIndexHierarchical(i); 
===============================================================================

"i" is within the bounds of my array and the row object does actually get created but the "CHILDREN" count=0.
this should represent the number of cells for that row in which I would index into that collection and then do work on the cell in question.
Error handling prevents the page from crashing and when the grid refreshes it show 12 or more rows of data but I can not access the children for any rows past the 11th one (dataItems 1-11 all have the required dropdown box, 12 and on do not)

any ideas?
(I have set the page size to 50)

Thanks Don
Don
Top achievements
Rank 2
 answered on 11 Aug 2011
1 answer
36 views

I have a tree, and a custom control.  The custom control has several labels that show what its current configuration are. 
I should be able to drag a node from the tree on top of the custom control - which will cause the custom control to update its configuration and show a new state. 
When I started coding, i used a text box - and I was able to drag and drop a node to it just fine. 
I have now started coding the custom control in earnest - which removes the checkbox and puts a bunch of text in its place - and now I can no longer drag the tree node on top of it.  

So, the question is - how can i define a particular area of the page as being "this is a place I can drag RadTreeNodes to". 

Note that I'm currently using  OnNodeDrop, I have not investigated the client-side drag and drop functionality. 
Plamen
Telerik team
 answered on 11 Aug 2011
3 answers
443 views
Hi,

I need to call the item_command event of rad grid on page load event of the same page where its' used.
Can anyone help me with the code to do the above. Is there any event handler with which I can pass the command name and call the item command event on page load.

Thanks.
Pavlina
Telerik team
 answered on 11 Aug 2011
4 answers
237 views
Hi,

I'm using the *Black* skin. Everywhere it uses green as a default (hover and select text in drop-downs, text area borders on select etc.) - I'd like to be able to change it to another color.

I am sure that you have not hard-coded the default green everywhere, and there must be a "master setting" to control it. Where would I find it ?...perhaps a master over-ride setting in the controls properties ?

Thanks,

Bazz
Barry
Top achievements
Rank 1
 answered on 11 Aug 2011
1 answer
56 views
I am having an issue where the e.sourcedragnode on my drop event is not the same node that is highlighted with the client side highlight, and not the one I dragged.  This is persisting with the latest version of the control.  I also find that if I highlight a node, then refresh the control (using ajax) My focused tree node moves up one.  When I drag, the node before the one I have selected is being dragged.

I have sent a request into support, but they don’t know of any known issues, I wanted to check with the community to see if anyone is having this issue?

Note in the attached, I dragged the right most red box with the arrow, and my "sourceDragnodetext" is that of the node just before it.  Very weird.  This does not happen all of the time, it seems like it can get "out of sync".  Anyone?
David Avery
Top achievements
Rank 1
 answered on 11 Aug 2011
5 answers
183 views
Hello,

Trying to align the master table columns with the child (DetailTable) columns.  The idea is that a user can see the master record and then expand the hierarchy to see the child view records which are audit records of the master ie same structure.  When user resizes a column, the child column also resizes to the same size (I do not display column headers in child view).

I'm using the code examples on resizing and it works well on the master, I just need to somehow translate that to the child view.

Thanks in advance,
Dale
Pooya
Top achievements
Rank 1
 answered on 11 Aug 2011
1 answer
118 views
Does anyone have any experience using AjaxManager & AjaxLoadingPanel with web user controls?
Basically I have two user controls and I need to parial update one of them as a response to an event raised by the other.
The partial update happens but it's the loading panel that it's not displayed.
It seems that I cannot attach my sample application  but imagine something like that:
I have a RadMenu with 4 options (Red, Green, Blue, Clear) and a simple asp:panel. Whenever I click on a button the panel changes is background color accordingly. When I use them like that in a page and ajaxiify the whole thing the color of the panel will change within a partial update and the loading panel image will be displayed.
Then I created 2 user controls, one encapsulates the menu and raises an event ColorChageRequested and the other contains the panel. With this configuration the partial update happens but the loading panel won't show.
Then I tried 2 more combination the RadMenu with the second user control and the first user control with asp:Panel and the same thing, the partial update happens without the loading panel being displayed.
It seems that whenever a user control is involved the loading panel is not displayed.
Does anyone see what is wrong with this? Do I need to implement anything within the user controls in order to achieve what I want?
Thanks
Iulian
Mira
Telerik team
 answered on 11 Aug 2011
2 answers
154 views
I am using the RadTreeView control in a asp.net webform. I am trying to get the ContextMenu to display when a user clicks the right mouse. The problem I am having is that when the webform displays and the right mouse is clicked on a node, nothing happens.

However, when I place the RadTreeView in a test.aspx form, everything works OK. It only doesn't work with my webform that has a master page. 

In the code behind for my page, I run the below code to set the context menu for each node that was generated.

            foreach (RadTreeNode node in RadTreeView1.GetAllNodes())
            {
                node.ToolTip = "test tool tip -> ";
                node.ContextMenuID = "AssetMenu";
                node.EnableContextMenu = true;
            }


Here is the .aspx that defines my RadTreeView control:
<telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="True" OnNodeDrop="RadTreeView1_NodeDrop"
    OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick"
    OnNodeDataBound="RadTreeView1_NodeDataBound">
        <ContextMenus>
        <telerik:RadTreeViewContextMenu runat="server" ID="AssetMenu" ClickToOpen="True" Skin="Vista">
            <Items>
                <telerik:RadMenuItem Text="Select Asset" Value="Select">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="View Hierarchy" Value="View">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadTreeViewContextMenu>
    </ContextMenus>
</telerik:RadTreeView>


Is there anything that I should be looking for in my master page that could possibly turn off the right mouse for the RadTreeView control? The tooltip is set successfully in the above code.

I have also tried assigning the contextmenu in the NodeDataBound() method without success.
What could I be missing with the contextmenu not displaying?

Jerry
Top achievements
Rank 1
 answered on 11 Aug 2011
2 answers
151 views
I'm adding a custom tooltip to "Special" events on the RadCalendar.  My code is below.

cell.Attributes.Add(

 

"id", "Calendar1_" + i.ToString());

 

RadToolTipManager1.TargetControls.Add(e.Cell.Attributes[

 

"id"], i.ToString(), true);

This works on the current month view.  So I'll hover and tooltip shows.....But when I add a future Event, I'll click on the next month link and it will show..ex. 9/9/2011....but when I hover all I get is a regular tooltip.
         Things I want to do:
                  1.  I want to load all my events info as the Page/Calendar loads.  I do not want to make an Ajax call.
                  2.  Tooltip doesnt seem to work on Weekends either, even on the current month....ex. 08/20/2011.....Any ideas?

Full Code:

 

 

 

protected void RadCalendar1_Load(object sender, EventArgs e)

 

{

 

 

RadCalendarDay calendarDay1 = new RadCalendarDay();

 

 

 

// calendarDay1.TemplateID = "EventTemplate";

 

 

 

 

 

calendarDay1.Date =

 

new DateTime(2011, 8, 19);

 

calendarDay1.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay1.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay1);

 

 

 

 

 

 

 

RadCalendarDay calendarDay2 = new RadCalendarDay();

 

calendarDay2.Date =

 

new DateTime(2011, 9, 9);

 

 

 

 

 

calendarDay2.ItemStyle.CssClass =

 

"rcEvent";

 

 

 

 

 

calendarDay2.ToolTip =

 

"This is a test2<br/>Hello2";

 

RadCalendar1.SpecialDays.Add(calendarDay2);

 

 

RadCalendarDay calendarDay3 = new RadCalendarDay();

 

calendarDay3.Date =

 

new DateTime(2011, 8, 30);

 

calendarDay3.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay3.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

// calendarDay3.TemplateID = "EventTemplate";

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay3);

 

 

RadCalendarDay calendarDay4 = new RadCalendarDay();

 

calendarDay4.Date =

 

new DateTime(2011, 3, 6);

 

calendarDay4.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay4.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

// calendarDay3.TemplateID = "EventTemplate";

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay4);

 

 

RadCalendarDay calendarDay5 = new RadCalendarDay();

 

calendarDay5.Date =

 

new DateTime(2011, 12, 11);

 

calendarDay5.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay5.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

// calendarDay3.TemplateID = "EventTemplate";

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay5);

}

 

 

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)

 

{

 

 

Control ctrl = Page.LoadControl("ToolTip.ascx");

 

args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);

 

 

ToolTip details = (ToolTip)ctrl;

 

details.TestText = args.Value;

}

 

 

 

protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)

 

{

 

 

//string test = "Hello";

 

 

 

 

 

 

 

if (IsDayRegisteredForTooltip((e.Day.Date)))

 

{

 

 

TableCell cell = e.Cell;

 

 

 

// cell.CssClass = "Appointment";

 

 

 

 

 

 

 

string localTime = DateTime.Now.ToLocalTime().ToString();

 

 

 

//cell.Attributes.Add("id", "Calendar1_" + localTime);

 

 

 

 

 

 

 

//RadToolTipManager1.TargetControls.Add(e.Cell.Attributes["id"], localTime, true);

 

 

 

 

 

cell.Attributes.Add(

 

"id", "Calendar1_" + i.ToString());

 

RadToolTipManager1.TargetControls.Add(e.Cell.Attributes[

 

"id"], i.ToString(), true);

 

 

 

// RadToolTip1.Controls.Add(cell);

 

 

 

 

 

i++;

}

 

}

 

 

private bool IsDayRegisteredForTooltip(DateTime date)

 

{

 

 

if (date.ToShortDateString().Equals("8/30/2011") || date.ToShortDateString().Equals("9/9/2011"))

 

 

 

// if ( date.ToShortDateString().Equals("9/10/2011"))

 

 

 

 

 

{

 

 

return true;

 

}

 

 

else

 

 

 

 

 

{

 

 

return false;

 

}

}

Shawn
Top achievements
Rank 1
 answered on 11 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?