Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
141 views
I have a Telerik file upload control. it renders misaligned to the other items on the page. How can I get the control to render left aligned?

The markup looks like this:

            <table>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="PleaseSelectAFileLabel" runat="server" Visible="false" Text="Please select a file." CssClass="ControlLabel"></asp:Label><br />
                        <asp:Label ID="PleaseSelectAFileType" runat="server" Visible="false" Text="Please select a file type." CssClass="ControlLabel"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="font-size:15px; font-weight:bold">File Type</div>
                    </td>
                    <td style="width: 296px" colspan="2">
                        <asp:DropDownList ID="EmployeeImportFormatDropDownList" AutoPostBack="true" runat="server" Width="200px" OnLoad="EmployeeImportFormatDropDownList_OnLoad"></asp:DropDownList>
                        <asp:LinkButton ID="EmployeeImportFormatDownloadLink" runat="server" Text="Download Template" OnClick="EmployeeImportFormatDownloadButton_OnClick" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="font-size:15px; font-weight:bold">File</div>
                    </td>
                    <td colspan="2">
                        <%--<asp:FileUpload ID="DataImportFileUpload" runat="server" Width="400px" EnableViewState="true"/><br />--%>
                        <telerik:RadAsyncUpload runat="server"  ID="DataImportsRadAsyncUpload" MultipleFileSelection="Disabled" MaxFileInputsCount="1" Width="375px" AllowedFileExtensions=".csv" />
                    </td>
                </tr>
                <tr valign="top">
                    <td width="75px"></td>
                    <td style="width: 296px">
                        <asp:Button ID="DataImportFileUploadImportButton" runat="server" Text="Import" OnClick="DataImportFileUploadImportButton_OnClick"/>&nbsp;&nbsp;<asp:Button ID="DataImportFileUploadCancelButton" runat="server" Text="Cancel" OnClick="DataImportUploadCancelButton_OnClick"/><br /><br />
                        <asp:LinkButton ID="DataImportMappingLink" runat="server" Text="Employee Data Import Mapping" PostBackUrl="../Company/ImportDataMapping.aspx"></asp:LinkButton>
                    </td>
                </tr>
            </table>
Tim
Top achievements
Rank 1
 answered on 15 May 2014
3 answers
112 views
I followed the code below to animate the panel bar to slide left/right:

if (pnlHelpPanel) {
                SetUpAnimation(imgHelpPanelTab.id, Telerik.Web.UI.jSlideDirection.Left, pnlHelpPanel);
            }
 
            function SetUpAnimation(image, direction, element) {
                element.style.position = "relative";
                var slider = document.getElementById(image);
 
                var expanded = false;
 
                var expandAnimation = new Telerik.Web.UI.AnimationSettings({});
                var collapseAnimation = new Telerik.Web.UI.AnimationSettings({});
 
                var slide = new Telerik.Web.UI.jSlide(element, expandAnimation, collapseAnimation, false);
 
                slide.initialize();
 
                slide.set_direction(direction);
 
                slider.onclick = function () {
                    element.parentNode.style.visibility = "visible";
                    element.parentNode.style.display = "block";
                    if (!expanded) {
                        slide.expand();
                    } else {
                        slide.collapse();
                    }
                    expanded = !expanded;
                    return false;
                } // end onlick function definition
 
            } // end SetUpAnimation

It works well doing a sliding animation left/right. However, I get an issue when trying to do the animation top/bottom. i changed the jSlideDirection to bottom and there was no sliding animation. Am I doing something wrong on my end or is there no animation for top/bottom?
Hristo Valyavicharski
Telerik team
 answered on 15 May 2014
1 answer
103 views
Hi,

    One of our client want to NOT format the contents when they paste their HTML (in html view). Here is an example. They paste something like this in HTML view

<table><tr style="background-color:#EEE;"><td>Routes</td><td>200</td></tr></table>

and when switch to design view and come back (or save), it turns into like this

<table>
    <tbody>
        <tr style="background-color: rgb(238, 238, 238);">
            <td>Routes</td>
            <td>200</td>
        </tr>
    </tbody>
</table>

Notice that editor not only format the codes (add link breaks etc), but also changes colors to rgb etc. 
Is there any way to prevent this?
thanks
We are using telerik controls version 2012.2.912.35

Ianko
Telerik team
 answered on 15 May 2014
4 answers
244 views
Hi,

I was working on a small sample that will populate a RadGrid using client side code and when I tried using 'get_masterTableView' function the script threw the following error:
"Object doesn't support property or method 'get_masterTableView'"

Here's my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestWebMethodCall.aspx.cs" Inherits="RestfulServiceClientApp.TestWebMethodCall" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
         <script src="Scripts/jquery-1.11.1.min.js"></script>
         <script type="text/javascript">
            //<![CDATA[
             $(document).ready(function () {
                 alert('DOM Ready !');
                 $('<%=RadAjaxLoadingPanel1.ClientID%>').show('<%=grd_ajaxifiedGrid.ClientID %>');
                 PageMethods.GetData(successMethod);
 
                 function successMethod(result) {
                     alert(result);
                     var masterTableView = $('<%=grd_ajaxifiedGrid.ClientID %>').get_masterTableView();
                     masterTableView.set_datasource(result);
                     masterTableView.dataBind();
                     $('<%=RadAjaxLoadingPanel1.ClientID%>').hide('<%=grd_ajaxifiedGrid.ClientID %>');
                 }
             });
 
            //]]>
        </script>
    </telerik:RadCodeBlock>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="scrptmgr_radScriptManager" EnablePageMethods="true"></telerik:RadScriptManager>
        <telerik:RadGrid ID="grd_ajaxifiedGrid" runat="server" EnableViewState="false" CellSpacing="-1" GridLines="Both" ClientIDMode="Static"
            Width="200" Height="400"></telerik:RadGrid>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
        <div>
        </div>
    </form>
</body>
</html>

and here's my Web Method in the code behind:

[WebMethod]
        public static List<string> GetData()
        {
            List<string> myLst = new List<string>();
            myLst.Add("Test1");
            myLst.Add("Test2");
            myLst.Add("Test3");
            myLst.Add("Test4");
            myLst.Add("Test5");
            return myLst;
        }

Please, help.

Many thanks in advance.
Ahmed Gamil
Top achievements
Rank 1
 answered on 15 May 2014
7 answers
228 views
NUTSHELL
I am exporting a grid that has Grid Column Groups to Excel and making changing the display of several fields from false to true.  The Grid Column Group is not expanding in Excel to handle the columns which are now displayed.

DETAIL
My grid has 16 viewable columns and 6 grid column groups.  When I go to Export to Excel, I change 10 additional columns so the display is true.  These columns are interspersed throughout the grid and not all at the end.  In Excel, the Grid Column Groups do not expand, so if they were 3columns before but now there are 6 columns under that group, it is still only 3 columns wide.  This of course throws everything off.

I am programming in MS Visual Studio 2012.
I am using Telerik UI for ASP.NET AJAX, v.2014.1.225.45

CODE
Protected Sub btnExport_Click(ByVal sender As Object, ByVal e As EventArgs)
 
    Me.RadGrid1.MasterTableView.GetColumn("Location").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_NotIssued").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_NotIssuedReason").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_Qualification").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_EstimatedProjectArea").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_EstimatedConstructionCost").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_WinningProbabilityPct").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_DateGranted").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_ProjectID").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_Comments").Display = True
 
    For Each item As GridDataItem In Me.RadGrid1.Items
        If item.Selected = False Then
            item.Visible = False
        End If
    Next
    Me.RadGrid1.ExportSettings.ExportOnlyData = True
    Me.RadGrid1.ExportSettings.OpenInNewWindow = True
    Me.RadGrid1.ExportSettings.FileName = "Selected Proposals " & Format(Now, "yyyy-MM-dd-h-mm-ss")
    'Me.RadGrid1.ExportSettings.IgnorePaging = True
    Me.RadGrid1.ExportSettings.UseItemStyles = True
    Me.RadGrid1.MasterTableView.ExportToExcel()
 
 
End Sub


HTML
I won't bother to post the HTML until asked, but here is the code for the GridColumnGroup and one of the non-displayed columns.




<ColumnGroups>
    <telerik:GridColumnGroup HeaderText="Proposal" Name="Proposal" HeaderStyle-HorizontalAlign="left"  >
        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
    </telerik:GridColumnGroup>
    <telerik:GridColumnGroup HeaderText="Fee" Name="Fee" HeaderStyle-HorizontalAlign="left" >
        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
    </telerik:GridColumnGroup>
    <telerik:GridColumnGroup  HeaderText="Key Dates" Name="Dates" HeaderStyle-HorizontalAlign="left" >
        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
    </telerik:GridColumnGroup>
    <telerik:GridColumnGroup HeaderText="Client" Name="Client" HeaderStyle-HorizontalAlign="left">
        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
    </telerik:GridColumnGroup>
    <telerik:GridColumnGroup HeaderText="Owner" Name="Owner" HeaderStyle-HorizontalAlign="left" >
        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
    </telerik:GridColumnGroup>
    <telerik:GridColumnGroup HeaderText="DLB" Name="DLB" HeaderStyle-HorizontalAlign="left">
        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
    </telerik:GridColumnGroup>
</ColumnGroups>


<telerik:GridBoundColumn Display="False" DataField="Proposal_Qualification" ColumnGroupName="Proposal"  HeaderStyle-Height="44px" HeaderStyle-HorizontalAlign="Left" HeaderStyle-VerticalAlign="Middle"
     FilterControlAltText="Filter Proposal_Qualification column" HeaderText="Qualification" SortExpression="Proposal_Qualification" UniqueName="Proposal_Qualification">
    <ColumnValidationSettings>
        <ModelErrorMessage Text="" />
    </ColumnValidationSettings>
    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Height="44px"></HeaderStyle>
 
    <ItemStyle Width="105px"></ItemStyle>
</telerik:GridBoundColumn>


Thank you!
Kostadin
Telerik team
 answered on 15 May 2014
2 answers
88 views
I've always found this website hard to navigate. In the past when I was trying to learn to use I guess the UI for MVC, I would get lost and end up reading and trying to apply tools that were not made for that platform. I really need to avoid this.

Right now I'm trying to find videos so I can become acquainted with the Telerik tools for ASP.NET web forms. I'm assuming that is the UI for ASP.NET AJAX option. But when I click on the video section, I don't see a list of tools or videos showing how to use the different tools. In fact there is little instructions on the video page at all that gives you direction.

I just want to be introduced to the tools, see how they work, see them applied, etc. Are there any videos or must I read the documentation? I'm not really interested in doing a lot of reading because I don't know what I'll be using. I just want to get up to speed very quickly.  Reading requires a lot more effort and requires that you use the tool to really understand how it works.

Any suggestions?
Maurice
Top achievements
Rank 1
 answered on 15 May 2014
4 answers
138 views
Discovered a problem on the latest editor, latest Firefox. If the editor is initially hidden when loaded, an extra <br> will be added to the existing content.

The behavior does not exist in Chrome or IE. The behavior does not exist in the previous version of the editor that we had (2012.2.724.40)

This is a significant problem for us.  Can you provide a solution?

Thanks,
Trevor.
Trevor
Top achievements
Rank 1
 answered on 15 May 2014
2 answers
81 views
Hi,
when I put my pivot inside a splitter I have the following error with firebug
TypeError: $get(...) is null

the row is 5160 Telerik.Web.UI
if(c.className.indexOf("ConfigurationPanel")!=-1){return $get(this.get_id()+"_OT").parentNode;
}return c;

when I debug it $get(this.get_id()+"_OT") is null

Is this a telerik bug?


<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="300">
            <telerik:RadPane ID="LeftPane" runat="server" Width="100">
                Left pane</telerik:RadPane>
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" Width="20px"
                Height="50px">
            </telerik:RadSplitBar>
            <telerik:RadPane ID="MiddlePane1" runat="server" Width="200">
                <telerik:RadPivotGrid ID="pivot" runat="server">
                </telerik:RadPivotGrid>
            </telerik:RadPane>
        </telerik:RadSplitter>
Mattia
Top achievements
Rank 2
 answered on 15 May 2014
2 answers
185 views
Can Tokens be restricted to one line instead of the RadAutoCompleteBox resizing? When InputType is set to Text the control does not resize.
Nencho
Telerik team
 answered on 15 May 2014
1 answer
86 views
Hi,
 how to have export buttons with my customised tooltip?
Princy
Top achievements
Rank 2
 answered on 15 May 2014
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?