Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
80 views

We need to edit the menu/submenu names that are displaying in attachment by double clicking on it.

Is there any possibility to achieve that goal? 

Abu
Top achievements
Rank 1
 asked on 03 Apr 2017
8 answers
542 views
I am working with the RadTabStrip and the RadMultiPage controls in a SharePoint web part and am running into a strange issue. The controls are loading properly and everything is working as expected, but after clicking a couple of tags the tab strip stops working. The click is being registered by the page because I can step into javascript debug statements, but none of the RAD code is executed. Below is my code but it pretty much matches the Load On Demand example.

Web Form:

 

 

 

 

<telerik:RadAjaxLoadingPanel runat="server" ID="radLoadingPanel" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="radTabStrip">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radTabStrip" />
                <telerik:AjaxUpdatedControl ControlID="radCenterFrame" LoadingPanelID="radLoadingPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radCenterFrame">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radCenterFrame" LoadingPanelID="radLoadingPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<script type="text/javascript">
  
    //function radTabStrip_OnClientSelecting(sender, args) {
    //    if (args.get_tab().get_pageViewID()) {
    //        alert(args.get_tab().get_test());
    //        args.get_tab().set_postBack(false);
    //    }
    //}
              
</script>
<div>
    <telerik:RadTabStrip ID="radTabStrip" runat="server" 
        SelectedIndex="0" MultiPageID="radCenterFrame" OnTabClick="radTabStrip_TabClick"
        Orientation="HorizontalTop">
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="radCenterFrame" runat="server" SelectedIndex="0" OnPageViewCreated="radCenterFrame_PageViewCreated" />
</div>

 

 

 

 

 



Code Behind:

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                RadTab skillTab = new RadTab();
                skillTab.Text = "Tab1";
                radTabStrip.Tabs.Add(skillTab);

                RadTab certTab = new RadTab();
                certTab.Text = "Tab2";
                radTabStrip.Tabs.Add(certTab);

                RadTab aspTab = new RadTab();
                aspTab.Text = "Tab3";
                radTabStrip.Tabs.Add(aspTab);

                RadTab tpTab = new RadTab();
                tpTab.Text = "Tab4";
                radTabStrip.Tabs.Add(tpTab);

                RadPageView pageView = new RadPageView();
                pageView.ID = skillTab.Text;
                radCenterFrame.PageViews.Add(pageView);
                skillTab.PageViewID = pageView.ID;
            }
        }

        protected void radCenterFrame_PageViewCreated(object sender, RadMultiPageEventArgs e)
        {
            string page = e.PageView.ID;

            switch (page)
            {
                case "Tab1":
                    AddControl("~/_ControlTemplates/Proj/Tab1Control.ascx", e);
                    break;
                case "Tab2":
                    AddControl("~/_ControlTemplates/Proj/Tab2Control.ascx", e);
                    break;
                case "Tab3":
                    AddControl("~/_ControlTemplates/Proj/Tab3Control.ascx", e);
                    break;
                case "Tab4":
                    AddControl("~/_ControlTemplates/Proj/Tab4Control.ascx", e);
                    break;
            }
        }

        protected void radTabStrip_TabClick(object sender, RadTabStripEventArgs e)
        {
            AddPageView(e.Tab);
            e.Tab.PageView.Selected = true;
        }
        private void AddPageView(RadTab tab)
        {
            RadPageView pageView = new RadPageView();
            pageView.ID = tab.Text;
            radCenterFrame.PageViews.Add(pageView);
            tab.PageViewID = pageView.ID;
        }
        private void AddControl(string Path, RadMultiPageEventArgs e)
        {
            Control userControl = Page.LoadControl(Path);
            userControl.ID = e.PageView.ID + "_usercontrol";
            e.PageView.Controls.Add(userControl);
        }

Marin Bratanov
Telerik team
 answered on 03 Apr 2017
1 answer
75 views

Hi,

We have a scenario whereby we have developed a user control that contains 3 related RadCombBox controls. Each of the comboboxes is loaded via a webservice call with the the parameter used for the second coming from the selected value of the first and the parameter used for the third coming from the selected value for the second.

Server side, setting this up is no problem, and when the SelectedItemChanged even is fired we do a postback and reset the depedent box(es) web parameters. However, when the user deletes the selected value from the first, say, there's no need to do a postback we just want to clear the items in the second and third and clear the web parameters.

Here's our code

    onClassificationChanged: function (eventArgs) {
        ClearRADCombo(this._nameComboID);
        ClearRADCombo(this._valueComboID);

        var classificationCombo = this.get_classificationCombo();
        var value = classificationCombo.get_value();

        if (value === undefined || value === "") {
            this.resetParameter(this._nameComboID, "ClassificationID");
            this.resetParameter(this._valueComboID, "NameID");
        }
    },
    resetParameter: function (comboID, parameterName) {
        var combo = $find(comboID);
        var paramAttrib = combo.get_attributes().getAttribute("WebServiceParameters");
        if (paramAttrib) {
            var parameters = JSON.parse(paramAttrib);
            for (var i = 0; i < parameters.length; i++) {
                if (parameters[i].Name === parameterName) {
                    parameters[i].Value = "";
                    break;
                }
            }
            var str = JSON.stringify(parameters);
            combo.get_attributes().setAttribute("WebServiceParameters", str);
            combo.get_element().setAttribute("WebServiceParameters", str);
        }
    },

function ClearRADCombo(controlId) {
    var ctrl = window.$find(controlId);
    if (ctrl) {
        ctrl.clearItems();
        ResetRADCombo(controlId);
    }
}
function ResetRADCombo(controlId) {
    var ctrl = window.$find(controlId);
    if (ctrl) {
        ctrl.clearSelection();
        ResetValidators(controlId);
    }
}

Note, the three combos are 'Classification', 'Name' and 'Value' (with Name dependent on 'Classification' and 'Value' dependent on name).

The onClassificationChanged function is linked with the 'OnBlur' event.

The problem is that sometimes the combo boxes successully clear the items but sometimes they don't (even though when debugging we can see that the code is still being hit).

Anybody know why the items wouldn't always clear?

 

Peter Milchev
Telerik team
 answered on 03 Apr 2017
10 answers
1.7K+ views
Hi:
I am adding an additional command via CommandItemTemplate and I would like to keep the defaults of Add and refresh.
<CommandItemTemplate> 
    <asp:LinkButton ID="radWindowAdd" runat="server" CommandName="MultiAdd" Text="Multi-Add" /> 
</CommandItemTemplate> 
 
But adding the above, seems to eliminate the default Add and Refresh.
Phil
Konstantin Dikov
Telerik team
 answered on 03 Apr 2017
7 answers
261 views

Hi

I have a Telerik grid that I need to be filled dynamicly.

I have a menu which is also dynamic, each item of the menu represented by a unique number, according to this number I know which SQL query to run and fill the grid accordingly.

The grid should have the options for: Insert, Update, Delete.

The grid should also have the option of filtering.

I need to change the columns headers as well at runtime while filling the grid.

What is the best way to implement those needs? 

Thanks,

Eliran

 

Mike
Top achievements
Rank 1
 answered on 03 Apr 2017
3 answers
923 views
After I have updated to the latest version of the Telerik ASP.NET AJAX (2013.3.1114.35) I get this error message.

Could not load file or assembly 'Telerik.Web.UI, Version=2013.3.1015.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I have searched the forums here and Stack Overflow an tried every possible solution I could find. But still I can't get rid of this error.

I have removed all references to the dll and added them again, I have search my hard drive for old versions en deleted them, I tried to compile the project in different order to see of that helped, I have search the GAC and there is no dll of the old version, I have deleted the ASP.NET Temporary files.

But now I don't have any clue where to go next.

Please help me with some suggestions.

Anders Pedersen 


Nyein Aung
Top achievements
Rank 1
 answered on 03 Apr 2017
1 answer
101 views
I have de dropdown control enabled in the footer of grids to set the number of items to show. The grids are covering nearly the whole webpage [screen size] and when the dropdown is selected to change the number of items to display, the numbers in the dropdown cannot be selected because they are outside the screen borders. Is there a way to have the dropdown open inside de grid  or so to speak as a 'dropup' control ?
Rumen
Telerik team
 answered on 02 Apr 2017
0 answers
65 views
Parent Code
01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Starter.aspx.cs" Inherits="WebWindows.Starter" %>
02. 
03.<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
04. 
05.<!DOCTYPE html>
06. 
08.<head runat="server">
09.    <title></title>
10. 
11.    <script type="text/javascript">
12.        function clientShow(sender, eventArgs)
13.        {
14.            var txtInput = document.getElementById("txtInput");
15.            sender.argument = txtInput.value;
16.        }
17.        function clientClose(sender, args)
18.        {
19.            if (args.get_argument() != null)
20.            {
21.                txtInput.value = args.get_argument();
22.            }
23.        }
24.</script>
25. 
26.     
27.</head>
28.<body>
29.    <form id="form1" runat="server">
30.        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
31.            <Scripts>
32.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
33.                </asp:ScriptReference>
34.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
35.                </asp:ScriptReference>
36.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
37.                </asp:ScriptReference>
38.            </Scripts>
39.        </telerik:RadScriptManager>
40.        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
41.        </telerik:RadAjaxManager>
42.    <div>
43.     
44.                            <telerik:RadWindow ID="RadWindow1" runat="server" Height="600px" Modal="True" Width="800px" NavigateUrl="Childform.aspx" OnClientClose="clientClose" OnClientShow="clientShow" OpenerElementID="showDialog" ReloadOnShow="True">
45.                            </telerik:RadWindow>
46.        <br />
47.            <telerik:RadDockLayout ID="RadDockLayout1" Runat="server">
48.                <telerik:RadDockZone ID="RadDockZone1" Runat="server" Height="300px" Width="1220px">
49.                    <telerik:RadDock ID="RadDock10" Runat="server" Height="136px" Width="1182px">
50.                        <ContentTemplate>
51.                            <br />
52.                            <br />
53.                            <br />
54.                             
55.                          
56.                             
57.                        </ContentTemplate>
58.                    </telerik:RadDock>
59.                </telerik:RadDockZone>
60.        </telerik:RadDockLayout>
61. 
62.                            <asp:TextBox ID="txtInput" runat="server"></asp:TextBox>
63.                            <asp:Button ID="showDialog" runat="server" OnClientClick="clientShow" Text="Open" />
64.          
65.            <br />
66. 
67.    </div>
68.    </form>
69.</body>
70.</html>


Child page code :

01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChildForm.aspx.cs" Inherits="WebWindows.ChildForm" %>
02. 
03.<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
04. 
05.<!DOCTYPE html>
06. 
08.<head runat="server">
09.    <title></title>
10.  
11. <script type="text/javascript">
12.      
13.     function pageLoad() {
14.         
15.         txtInput = document.getElementById('txtUserInput');
16.         var currentWindow = GetRadWindow();
17.         txtInput.value = currentWindow.argument;
18. 
19.           
20.     }
21. 
22. 
23.     function GetRadWindow() {
24.         var oWindow = null;
25.         if (window.radWindow)
26.             oWindow = window.radWindow;
27.         else if (window.frameElement.radWindow)
28.             oWindow = window.frameElement.radWindow;
29.         return oWindow;
30.     }
31. 
32. 
33. 
34. 
35.     //Close the dialog and return the argument to the OnClientClose event handler
36.     function returnArg() {
37.          
38.         var oWnd = GetRadWindow();
39.         oWnd.close(txtInput.value);
40.     }
41. 
42.</script>      
43. 
44. 
45. 
46. 
47.</head>
48.<body>
49.    <form id="form1" runat="server">
50.    <div>
51.     
52.   
53. 
54.        
55.     
56.        <asp:ScriptManager ID="ScriptManager1" runat="server" OnLoad="Page_Load">
57.        </asp:ScriptManager>
58.       
59.        <asp:TextBox ID="txtUserInput" runat="server"></asp:TextBox>
60.        <br />
61.        <br />
62.        <asp:Button ID="Button1" runat="server" Text="Close With Argument" OnClientClick="returnArg(); return false;" />
63.        <br />
64. 
65.        
66.     
67.         
68. 
69. 
70. 
71.    </div>
72.    </form>
73.</body>
74.</html>


** The code working perfect if Textbox and Button outside RadDock Control, But inside doesn't work? 
Check attached video files.
Thanks
Vmax

Vmax
Top achievements
Rank 1
 asked on 02 Apr 2017
0 answers
74 views

Parent Code

01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Starter.aspx.cs" Inherits="WebWindows.Starter" %>
02. 
03.<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
04. 
05.<!DOCTYPE html>
06. 
08.<head runat="server">
09.    <title></title>
10. 
11.    <script type="text/javascript">
12.        function clientShow(sender, eventArgs)
13.        {
14.            var txtInput = document.getElementById("txtInput");
15.            sender.argument = txtInput.value;
16.        }
17.        function clientClose(sender, args)
18.        {
19.            if (args.get_argument() != null)
20.            {
21.                txtInput.value = args.get_argument();
22.            }
23.        }
24.</script>
25. 
26.     
27.</head>
28.<body>
29.    <form id="form1" runat="server">
30.        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
31.            <Scripts>
32.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
33.                </asp:ScriptReference>
34.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
35.                </asp:ScriptReference>
36.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
37.                </asp:ScriptReference>
38.            </Scripts>
39.        </telerik:RadScriptManager>
40.        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
41.        </telerik:RadAjaxManager>
42.    <div>
43.     
44.                            <telerik:RadWindow ID="RadWindow1" runat="server" Height="600px" Modal="True" Width="800px" NavigateUrl="Childform.aspx" OnClientClose="clientClose" OnClientShow="clientShow" OpenerElementID="showDialog" ReloadOnShow="True">
45.                            </telerik:RadWindow>
46.        <br />
47.            <telerik:RadDockLayout ID="RadDockLayout1" Runat="server">
48.                <telerik:RadDockZone ID="RadDockZone1" Runat="server" Height="300px" Width="1220px">
49.                    <telerik:RadDock ID="RadDock10" Runat="server" Height="136px" Width="1182px">
50.                        <ContentTemplate>
51.                            <br />
52.                            <br />
53.                            <br />
54.                             
55.                          
56.                             
57.                        </ContentTemplate>
58.                    </telerik:RadDock>
59.                </telerik:RadDockZone>
60.        </telerik:RadDockLayout>
61. 
62.                            <asp:TextBox ID="txtInput" runat="server"></asp:TextBox>
63.                            <asp:Button ID="showDialog" runat="server" OnClientClick="clientShow" Text="Open" />
64.          
65.            <br />
66. 
67.    </div>
68.    </form>
69.</body>
70.</html>


Child page code :

01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChildForm.aspx.cs" Inherits="WebWindows.ChildForm" %>
02. 
03.<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
04. 
05.<!DOCTYPE html>
06. 
08.<head runat="server">
09.    <title></title>
10.  
11. <script type="text/javascript">
12.      
13.     function pageLoad() {
14.         
15.         txtInput = document.getElementById('txtUserInput');
16.         var currentWindow = GetRadWindow();
17.         txtInput.value = currentWindow.argument;
18. 
19.           
20.     }
21. 
22. 
23.     function GetRadWindow() {
24.         var oWindow = null;
25.         if (window.radWindow)
26.             oWindow = window.radWindow;
27.         else if (window.frameElement.radWindow)
28.             oWindow = window.frameElement.radWindow;
29.         return oWindow;
30.     }
31. 
32. 
33. 
34. 
35.     //Close the dialog and return the argument to the OnClientClose event handler
36.     function returnArg() {
37.          
38.         var oWnd = GetRadWindow();
39.         oWnd.close(txtInput.value);
40.     }
41. 
42.</script>      
43. 
44. 
45. 
46. 
47.</head>
48.<body>
49.    <form id="form1" runat="server">
50.    <div>
51.     
52.   
53. 
54.        
55.     
56.        <asp:ScriptManager ID="ScriptManager1" runat="server" OnLoad="Page_Load">
57.        </asp:ScriptManager>
58.       
59.        <asp:TextBox ID="txtUserInput" runat="server"></asp:TextBox>
60.        <br />
61.        <br />
62.        <asp:Button ID="Button1" runat="server" Text="Close With Argument" OnClientClick="returnArg(); return false;" />
63.        <br />
64. 
65.        
66.     
67.         
68. 
69. 
70. 
71.    </div>
72.    </form>
73.</body>
74.</html>


** The code working perfect if Textbox and Button outside RadDock Control, But inside doesn't work? 
Check attached video files.
Thanks

Vmax

Vmax
Top achievements
Rank 1
 asked on 02 Apr 2017
1 answer
97 views

Apologies if this is the wrong forum but there doesnt seem to be one dedicated to language support.

Attached is a sample MVC project that uses the HTML Treelist helper. This sample has Entity Framework stripped out in order to enable the developer to focus strictly on the concepts of retrieving remote data from the server and binding to the control. The startup screen is currently .cshtml as the fluent syntax for .vbhtml is undocumented (there is an action method /home/indexvb to run a vb equivalent but its not working due to the lack of the relevant syntax.)

Would be grateful if you could please advise on the correct syntax to populate the treelist.

Many thanks

PS Please rename VBTreelist.png to VBTreelist.zip. Apparently only images are allowed as attachments to posts

Yemo
Top achievements
Rank 1
Iron
 answered on 02 Apr 2017
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?