Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
606 views
Hi There,

I have an issue while using dropdownlist control. I am assigning margin to body of the webpage. While assigning margin the startup position of the dropdown items are moving towards right side from the control actual position.

What would be solution for this issue. This issue is there even with datepicker too.

Regards

Anandh G
Kate
Telerik team
 answered on 20 Nov 2013
1 answer
216 views
I have an aspx that loads a TabStrip control and MultiPage control. The TabStrip is populated in the code-behind. The MultiPage is created only for the first tab. When the user clicks on another tab, the MultiPage is created at that point.

Each MultipPage PageView loads a .ascx when the tab is selected by clicking on it.

On tab 1, I have an ascx that loads a RadGrid. The grid contains a button, that when clicked, I want to select tab 2. The MultiPage PageView for tab 2 has not been created yet. The .aspx page has logic to create the PageView, if not created yet, in the TabClick event.

In the codebehind for the click event for the button on Tab 2, I can locate the tab control on the parent page and issue a select on tab 2, but that does not trigger the click event on the tab.

How do I get the aspx to create the new PageView?

This is my .aspx page that creates the tabs dynamically and the pageviews, when needed:
Imports Telerik.Web.UI
Public Class Clients
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        If Not Page.IsPostBack Then
            Dim dal As New Navigation
            Dim ds As DataSet = dal.NavigationSelect(1)
            Dim bAddPageView As Boolean = True
 
            For Each row As DataRow In ds.Tables(0).Rows
                AddTab(row.Item("NavName"), bAddPageView)
                bAddPageView = False
            Next
        End If
    End Sub
 
    Private Sub AddTab(ByVal tabName As String, ByVal bAddPageView As Boolean)
        Dim tab As RadTab = New RadTab
 
        tab.Text = tabName
 
        NavTabStrip.Tabs.Add(tab)
 
        If bAddPageView Then
            AddPageView(tab)
        End If
    End Sub
 
    Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs)
        Dim userControlName As String = e.PageView.ID + ".ascx"
 
        Dim userControl As Control = Page.LoadControl(userControlName)
 
        userControl.ID = e.PageView.ID & "_userControl"
        e.PageView.Controls.Add(userControl)
 
    End Sub
 
    Private Sub AddPageView(ByVal tab As RadTab)
        Dim pageView As RadPageView = New RadPageView
 
        pageView.ID = tab.Text.Replace(" ", "")
 
        RadMultiPage1.PageViews.Add(pageView)
        tab.PageViewID = pageView.ID
 
    End Sub
 
    Protected Sub NavTabStrip_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs)
        Dim pageView As RadPageView = RadMultiPage1.FindControl(e.Tab.Text.Replace(" ", ""))
 
        If IsNothing(pageView) Then
            AddPageView(e.Tab)
        End If
        e.Tab.PageView.Selected = True
    End Sub
 
    Private Shared Function FindControlRecursive(Root As Control, Id As String) As Control
 
        If Root.ID = Id Then
            Return Root
        End If
 
        For Each Ctl As Control In Root.Controls
 
            Dim FoundCtl As Control = FindControlRecursive(Ctl, Id)
 
            If FoundCtl IsNot Nothing Then
                Return FoundCtl
            End If
        Next
 
        Return Nothing
 
    End Function
 
End Class

This is the aspx page itself:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Clients.aspx.vb" Inherits="MainApp.Clients" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html>
 
<head id="Head1" runat="server">
    <title></title>
    <link href="../Css/Clients.css" rel="stylesheet" type="text/css" />
</head>
 
<body>
    <form id="form1" runat="server">
        <div style="position: relative">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>
            <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                            <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>
            <script type="text/javascript">
                function onTabSelecting(sender, args) {
                    if (args.get_tab().get_pageViewID()) {
                        args.get_tab().set_postBack(false);
                    }
                }
            </script>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet">
 
                <telerik:RadTabStrip ID="NavTabStrip" runat="server" OnClientTabSelecting="onTabSelecting" SelectedIndex="0" Width="1000px" MultiPageID="RadMultiPage1" Skin="Forest" Align="Justify" OnTabClick="NavTabStrip_TabClick" />
                <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" />
 
            </telerik:RadAjaxPanel>
        </div>
 
    </form>
</body>
</html>

This is the ascx page that is loaded in tab !. I have simplified it by just having the button in there.

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ClientListing.ascx.vb" Inherits="MainApp.ClientListing" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy2" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ClientListing">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ClientListing" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
 
<telerik:RadGrid ID="ClientListing" ShowGroupPanel="false" PageSize="5" AllowPaging="True" runat="server" AllowSorting="True" AllowFilteringByColumn="true" ShowHeader="False"
    OnNeedDataSource="ClientListing_NeedDataSource" CssClass="RadGrid">
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
    <MasterTableView TableLayout="Fixed">
        <ItemTemplate>
              <telerik:RadButton ID="Edit" runat="server" Text="Edit" Skin="Forest" Width="105px" OnClick="Edit_Click">
                  <Icon PrimaryIconCssClass="rbEdit"
              </telerik:RadButton>
        </ItemTemplate>
    </MasterTableView>
</telerik:RadGrid>


This is the codebehind for the ascx page:

Imports Telerik.Web.UI
Public Class ClientListing
    Inherits System.Web.UI.UserControl
 
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
    End Sub
 
    Protected Sub Edit_Click(sender As Object, e As EventArgs)
        Dim rts As RadTabStrip = DirectCast(Me.Parent.FindControl("NavTabStrip"), RadTabStrip)
 
        rts.Tabs(1).Selected = True
        rts.Tabs(1).PageView.Selected = True  'This will throw an error because PageView has not been created yet
 
    End Sub
End Class



Nencho
Telerik team
 answered on 20 Nov 2013
3 answers
423 views
My requirement says that i need a editor to edit xslt file. Which is generated from the database and shown in radedtior content.
The end users are allowed to edit the design mode and are allowed to save the data back to the database.

When i use ContentAreaMode="Div" as soon as the page loads the above alert message gets triggered which i
don't wanted. kindly suggest me how to fix the above issue.
I want the ContentAreaMode="Div"
 




<%@ Page Title="" Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/Normal.Master"
  
CodeBehind="EditEmailTemplate.aspx.cs" Inherits="EditEmailTemplate"
  
ValidateRequest="false" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<%@ Register Src="~/UserControls/metadata.ascx" TagName="Meta" TagPrefix="VT" %>
  
<%@ Register Src="~/UserControls/BottomPageScripts.ascx" TagName="Tracking" TagPrefix="VT" %>
  
<%@ Register Src="~/UserControls/SecurityControl.ascx" TagName="Security" TagPrefix="VT" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  
<link href="App_Themes/Daimler/style.css" rel="stylesheet" type="text/css" />
  
</asp:Content>
  
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
  
<hr />
  
<asp:Panel runat="server" ID="pnlhead">
  
<div style="vertical-align: middle">
  
<table style="margin-left: 4%;" class="dashboard-advanced-search">
  
<tr>
  
<td style="vertical-align: middle; width: 8%" class="label">
  
<asp:Label ID="lblSub" runat="server" Text="Subject: "></asp:Label>
  
</td>
  
<td style="vertical-align: middle; width: 34%">
  
<asp:TextBox ID="txtSubject" runat="server" Style="width: 320px;"></asp:TextBox>
  
</td>
  
<td style="vertical-align: middle; width: 4%">
  
</td>
  
<td style="vertical-align: middle; width: 7%" class="label">
  
<asp:Label ID="lblType" runat="server" Text="Name: "></asp:Label>
  
</td>
  
<td style="vertical-align: middle; width: 42%">
  
<asp:TextBox ID="txtType" runat="server" Style="width: 260px;"></asp:TextBox>
  
</td>
  
</tr>
  
</table>
  
</div>
  
</asp:Panel>
  
<hr />
  
<asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Width="94%">
  
<asp:Label ID="lblMessage" runat="server" Text="Record saved successfully." Visible="true"
  
Font-Bold="true" ForeColor="Green" Font-Size="Small"></asp:Label>
  
<br />
  
</asp:Panel>
  
</asp:Content>
  
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
  
<div style="padding-left: 1%; padding-right: 1%;">
  
<telerik:RadTabStrip ID="tbtemplate" runat="server" MultiPageID="RadMultiPage1" Skin="Black"
  
SelectedIndex="0" OnTabClick="tbtemplate_TabClick" OnLoad="tbtemplate_Load">
  
<tabs>
  
<telerik:RadTab Text="XSLT" CssClass="tabStrip" Selected="True">
  
</telerik:RadTab>
  
<telerik:RadTab Text="Preview" CssClass="tabStrip">
  
</telerik:RadTab>
  
</tabs>
  
</telerik:RadTabStrip>
  
<div style="padding-bottom: 0.6%; padding-top: 0.3%;">
  
<asp:Panel ID="Panelbtn" runat="server" HorizontalAlign="Right" Width="98%">
  
<asp:ImageButton ID="btnSave" runat="server" ImageUrl="images/btn-save.png" OnClick="btnSave_Click" />
  
     
  
<asp:ImageButton ID="btnCancel" runat="server" ImageUrl="~/images/btn-cancel.png"
  
OnClick="btnCancel_Click" />
  
</asp:Panel>
  
</div>
  
<div>
  
<telerik:RadEditor ContentAreaMode="Div" runat="server" ID="RadEditor1" 
  
EditModes="Preview,Design" AutoResizeHeight="true" Height="715" >
  
<modules>
  
<telerik:EditorModule Enabled="false" Visible="false" />
  
  
</modules>
  
</telerik:RadEditor>
  
</div>
  
</div>
  
</asp:Content>
Ianko
Telerik team
 answered on 20 Nov 2013
5 answers
98 views
We have an application that can potentially pull in a LOT of items into a grid control. So many that we've had to put a limit in of 300. However, the users want to see the TOTAL number of items as well as the "maximum allowed" number of items. So if we've got 1,000 records and a per-page count of 25, they'd like to see "300 of 1000 in 12 pages". Is there a way to do this? I've experimented with the VirtualItemCount property but that doesn't seem to quite do it.

Thanks in advance for any helpful replies, even if it's just "No, this can't be done in this control!"
Jerry
Top achievements
Rank 1
 answered on 20 Nov 2013
4 answers
112 views
Hi,

I have RadGrid control inside RadWindow. when the rows are less in grid RadWindow doesnot show any scroll. but when the grid has more results, this is pushing RadWindows height.

in the attached images you can notice the empty space in radwindow is bcoz of the rows in grid.

Please help!

Thanks in advance!
Karthik
Top achievements
Rank 1
 answered on 20 Nov 2013
1 answer
102 views
I am currently using a radcombobox with loadondemand and checkboxes. When i enter text to search for, the web service  returns the list of items to bind to the combobox, however the search text is being cleared when the list is bound. 
I have used the onclientItemsRequested to set the text of the textbox after the items are bound however, the onclientitemsrequested does not get called if the search does not find any matches. 

I would like for the text to remain in the box even if there are no boxes, would that be possible? 
Nencho
Telerik team
 answered on 20 Nov 2013
6 answers
103 views

RadComboBox.Text doesn't get the input text in IE9. It works on all other browsers. The properties are set as follows;


<telerik:RadComboBox ID="RecipientCategory" runat="server" AllowCustomText="True" Filter="Contains" MarkFirstMatch="True" Width="300px"></telerik:RadComboBox>

 

 

Hristo Valyavicharski
Telerik team
 answered on 20 Nov 2013
1 answer
99 views
Hi,

We are using telerik Rad controls.

We want to use selection-start property in script part. But when we insert any break point then we Press F10 and then run the program the SelectionStart is working perfectly in RadTextBox.

But without breakpoint it is not working properly.

Kindly do the needful as soon as possible.

Thanks.
Manimozhi
Vasil
Telerik team
 answered on 20 Nov 2013
16 answers
696 views
Hi, I would like to create an RADWindow without border, is this possibile?
Marin Bratanov
Telerik team
 answered on 20 Nov 2013
1 answer
70 views
Hi,

Is it possible to insert an image in HTML view in the editor. (Image Manager)

Regards

Rune Solberg
Vessy
Telerik team
 answered on 20 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?