Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
24 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
408 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
206 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
38 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
154 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
93 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
122 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
112 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
8 answers
133 views
hey guys, i have a plain jane radFilter: how can i get the default when i choose this to display something other than, "Equal To" - .jpg is attached.
thanks
rik

<

 

 

telerik:RadFilter ID="RadFilter1" runat="server">

 

 

 

<FieldEditors>

 

 

 

<telerik:RadFilterTextFieldEditor FieldName="WORKORDERNUMBER" DisplayName="Work Order#" DataType="System.String" />

 

 

 

<telerik:RadFilterTextFieldEditor FieldName="TRACKINGNUMBER" DisplayName="Tracking#" DataType="System.String" />

 

 

 

</FieldEditors>

 

 

 

</telerik:RadFilter>

 

Mira
Telerik team
 answered on 11 Aug 2011
6 answers
349 views
Hi,

I have a rad grid with paging enabled. I would like to select multiple records using check boxes.  The code is posted below. It doesn't work when items selected from more than one page. Any help would be appreciated.




  protected void ButtonApprove_Click(object sender, EventArgs e)
        {
            var UniqueIds = new List<string>();
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items) // Loop through each items
            {
                CheckBox chkBox = (CheckBox)item.FindControl("CheckBoxStatus"); // Get the checkbox control
                if (chkBox.Checked)
                {
                    var UniqueId = item["UniqueId"].Text;
                    UniqueIds.Add(UniqueId);                
                }
                
            }
                foreach (var ss in UniqueIds)
                {
                    var thisExpenseDetails = _repository.GetExpenseDetailsByUniqueID(ss);
                    thisExpenseDetails.Status = ExpensesClaimResource.StatusApproved;
                    _repository.SaveEntities();
                }

                 RadGrid1.Rebind();
        }

Thanks,
Anita
Anita
Top achievements
Rank 1
 answered on 11 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?