Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
532 views
I have a rad grid, which returns a list of data.  I have a subgrid, which should return details in another grid based on the id of the record in the master table and the value of a item selected in a dropdown list.  The subgrid passes 2 parameters to a SQL server stored proc.

If I run the subgrid outside of the hierarchical grid the data is returned no problems.  I followed the example in the demo and have a label that evaluates a datakey.  If I make the label visible the Id displays properly.  However the grid below does not show any data.

Any help would be greatly appreciated.
Andrey
Telerik team
 answered on 18 May 2012
6 answers
258 views
Hello,

I am looking for some code snippet, that will enable the ContextMenu of my TreeView to show.  I tried following, but I think it wants some parameter to be passed along with show(parameter); and I do not know what to pass here.  I have tried passing in the node, but that did not work.

function ShowContextMenu() {
    var tree = $find('tvEstimate');
    var node = tree.get_selectedNode();
    if (node) {
        var menu = node.get_contextMenu();
        menu.show();
    } 
}

The above code gets triggerd by clicking a button,  I have also debugged the above code, and there are valid values in each object - tree, node and menu.  They all have proper values in them, but menu.show() does not show the context menu.  Any suggestion?

Thanks.
Bozhidar
Telerik team
 answered on 18 May 2012
1 answer
76 views
http://demos.telerik.com/aspnet-ajax/treelist/examples/integration/discussionboard/defaultcs.aspx 

Adding single quotes to any of the fields and hitting submit causes the form to blow up.
Tsvetina
Telerik team
 answered on 18 May 2012
1 answer
105 views
I have EnableAsyncUpload="true" set on my RadFileExplorer which uploads files to a third party file hosting provider.  I would like to display the RadFileExplorer's RadAjaxLoadingPanel while the the files are being transferred from the server to the hosting provider.  What is the best way to accomplish this?

The current flow is as follows: 
1) User clicks "Upload"
2) Async upload dialog is shown
3) Files selected and uploaded to server (progress of each file upload is shown in the async upload dialog
4) User clicks the "Upload" button in the async upload dialog
5) The async upload dialog closes
6) Files are transferred from server to the third party file hosting provider (during this process, nothing is happening on the UI screen)
7) UI is updated to show newly uploaded files in the RadFileExplorer's grid

What I am looking for is a way to indicate to the user that something is happening during step 6.  Any help is appreciated.
Dobromir
Telerik team
 answered on 18 May 2012
6 answers
360 views
I've created a project that saves dockstate to a database and dynamically adds docks to the page (based on the myPortal with db example found in these forums).

My project contains one page where a user is displayed a number of default docks and others they have added from a second page.

To reduce the load on the database, instead of saving the dockState to the database every time SaveDockLayout is fired I was planning on retaining the dockState in session and only saving to the database when a dock is actually moved or removed from the database. Part of this I believe can be achieved using the server side event DockPositionChanged. The problem is I cannot get this event to fire.

When creating the dock i've tried the following:
dock.Attributes.Add("OnDockPositionChanged""RadDock_DockPositionChanged"
dock.OnClientDockPositionChanged = "RadDock_DockPositionChanged" 


The second obviously doesn't work as it is looking for client code.

Code for the event handler (that doesn't get fired)
Protected Sub RadDock_DockPositionChanged(ByVal sender As ObjectByVal e As Telerik.Web.UI.DockPositionChangedEventArgs) 
    Dim dock As RadDock 
    dock = DirectCast(sender, RadDock) 
 
    If dock.DockZoneID <> e.DockZoneID Then 
... 

How do you wire up the dynamically created dock to fire the server event?

Thanks.

Slav
Telerik team
 answered on 18 May 2012
7 answers
293 views

Hi,

I try to generate an OrgChart dynamically, for do that, I need to add actions to the orgChart item (by RadButton).

In my first POC, I try the programm below.

<%@ Control language="C#" Inherits="DotNetNuke.Modules.Quanteam.ContractModule.View" AutoEventWireup="false"  Codebehind="View.ascx.cs" %>
<%@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
 
<asp:MultiView ID="multiView" runat="server">
    <asp:View ID="ViewContractDetail" runat="server">
        <telerik:RadOrgChart runat="server" ID="radOrgChart">
            <Nodes>
                <telerik:OrgChartNode>
                    <ItemTemplate>
                        <div style="background-color: Red; height: 80px; width: 180px;">
                            <telerik:RadButton ID="TestBtnOrgChart" Text="click : 0" runat="server"
                                OnClick="onClick_Handler"
                                ValidationGroup="ParamValidationGroup"
                                ButtonType="LinkButton" BorderStyle="None">
                                <Icon PrimaryIconUrl="~/images/Add.gif" PrimaryIconLeft="5px" />
                            </telerik:RadButton>
                        </div>
                    </ItemTemplate>
                    <GroupItems>
                        <telerik:OrgChartGroupItem Text="Click for Test" />
                    </GroupItems>
                </telerik:OrgChartNode>
        </telerik:RadOrgChart>
    </asp:View>
</asp:MultiView>

 

private void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                System.Web.UI.WebControls.View view = FindControl("ViewContractDetail") as System.Web.UI.WebControls.View;
                multiView.SetActiveView(view);
 
                //----------------------------------------------------
                // RadOrgChart
                //----------------------------------------------------
 
                var nodeContract = new OrgChartNode();
                radOrgChart.Nodes.Add(nodeContract);
 
                OrgChartGroupItem topContract = new OrgChartGroupItem() { Template = new MyTemplate("btnOrgChart1") };
                nodeContract.GroupItems.Add(topContract);
 
                var node = new OrgChartNode();
                topContract.Node.Nodes.Add(node);
 
                OrgChartGroupItem missionNode = new OrgChartGroupItem() { Template = new MyTemplate("btnOrgChart2", onClick_Handler) };
                node.GroupItems.Add(missionNode);
 
                //----------------------------------------------------
                // RadButton
                //----------------------------------------------------
 
                RadButton radBtn = new RadButton();
                radBtn.ID = "btn_1";
                radBtn.Text = string.Format("click : {0}", 0);
                radBtn.Click += onClick_Handler;
                view.Controls.Add(radBtn);
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
 
        class MyTemplate : ITemplate
        {
            private string _id;
            private System.EventHandler _onClick;
 
            public MyTemplate(string id)
            {
                _id = id;
                _onClick = onClick_Handler;
            }
 
            public MyTemplate(string id, System.EventHandler onClick)
            {
                _id = id;
                _onClick = onClick;
            }
 
            public void InstantiateIn(Control container)
            {
                RadButton radBtn = new RadButton();
                radBtn.ID = _id;
                radBtn.Text = string.Format("click {1} : {0}", 0, _id);
                radBtn.Click += _onClick;
                container.Controls.Add(radBtn);
            }
 
            protected void onClick_Handler(object sender, System.EventArgs e)
            {
                RadButton radBtn = sender as RadButton;
                radBtn.Text = string.Format("click {1} : {0}", Convert.ToInt32(radBtn.Text.Split(':')[1]) + 1, _id);
            }
        }
 
        protected void onClick_Handler(object sender, System.EventArgs e)
        {
            RadButton radBtn = sender as RadButton;
            string[] items = radBtn.Text.Split(':');
 
            radBtn.Text = string.Format("{0} : {1}", items[0], Convert.ToInt32(items[1].Trim()) + 1);
        }

 

When I try this program, the button created into the OrgChart by API call the Page_Load handler, but not the associated click handler.
Even if the handler came from the view or from the custom ITemplate class.

The two buttons of control :
- generated with the ASX and inside of the OrgChart
- generated with the API and outside of OrgChart
works normally.

Why my two Button generated with API into the OrgChar seems to don't call the Click event.

For information, I begin on ASP.Net since few week.

Thanks for your help.

 

Peter Filipov
Telerik team
 answered on 18 May 2012
3 answers
122 views
Is it possible to make Tab strip functionality works like Rad Menu which means when I hover on Tab strip I would like to show the Tab items in a drop down how can I achieve this. Also when I select an Item from drop down I would like to set the selected Item in selected state
Kate
Telerik team
 answered on 18 May 2012
1 answer
237 views
Hi ,
I am using Rad Control in SharePoint site masterpage.
in Office2007 skin i want to change the hover color from Orange to white...etc.,
Rad menus comes dynamically, so i don't know how to customize this.

Thanks & Regards
MD Liakath Ali
Shinu
Top achievements
Rank 2
 answered on 18 May 2012
1 answer
122 views
Hi

I am having two treeviews on  a same page.
I want to know that whether there is some in built functionality exists in treeview so that if I drag and drop any node from treeview1 to another trreview2.

Or there is some another control exists in your library to achieve this functionality(I have to mapped one node to the another node in database.)

Please let me know.
Plamen
Telerik team
 answered on 18 May 2012
6 answers
299 views
I have a usercontrol that has a radasync upload. When I set the OnClientFileUploaded event the control is hidden?

<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions="png" Width="100%"
                      MaxFileSize="524288" OnFileUploaded="RadAsyncUpload1_FileUploaded" OnClientFileUploaded="fileUploaded"
                      />

If I remove the OnClientFileUploaded tag the control shows with no problem?

P
plusHR
Top achievements
Rank 1
 answered on 18 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?