Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
142 views
Hi Telerik ,

Would like to hide timepicker control by defaullt. As per my filter criteria on other controls, I shd be able to show/hide the radTimepicker again. Can this be achieved by using javascript/Jquery? Or any direct prop for the control itself?

Regards,
San
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2013
14 answers
197 views
Hello,
I am using RadUpload (ASP.NET AJAX) control along with progress bar in my ASP.NET application which is working fine with IE 8 and IE 9. But with the Release previow of Windows 8, a number of our customers have started using Windows 8 which has release preview version of IE 10 and it seems that with IE 10 on Windows 8, the progress bar won't go away and eventually ends up in a time out.

Has anybody else experienced this issue and is there a workaround for this? Attached is an image of the borgress bar which won't go away.

Any help in this regard would be appreciated.

Thanks,

Zafar
Peter Filipov
Telerik team
 answered on 22 Aug 2013
1 answer
200 views
Hi Follows, First Sorry about my english.

I am with the following problem.

I Have a "Radgridview" configured with options for export to excel, pagination, pagesized and sorting and it are inside a "RadAjaxPanel" basically.

follows the structure:
<telerik:RadAjaxPanel ...
<telerik:RadGrid OnItemCommand="GridView_RowCommand" OnPageIndexChanged="GridView_Pagination"
                OnPageSizeChanged="GridView_PageSize"
...

the function "export to excel" needs of real postback to do the exportation, for this I've been used the "RegisterPostBackControl" forcing the button of the exportation to do the postback.

Follows the code:

ScriptManager.GetCurrent(Page).RegisterPostBackControl(exportButton);

I Don't use DataSource plugged on RadGrid, in all interaction like pagination or change page size or sorting, I use method on the code-behind to do the search again and I force the RegisterPostBackControl again.


Basically the methods apply the instructions and do the new search. OBS: Pagination, pagesized, Sorting are Ok.

The Problem:

When I changed the page or sorting or pagesized, and after any this actions I try to export to excel, the all grid rebind but without pagination control, pagesized control and the sorting and the export dont work.



 protected virtual void GridView_RowCommand(object sender, GridCommandEventArgs e)
        {
            switch (e.CommandName)
            {
                case SharedHardCode.CommandName.View:
                    this.ViewObject(sender, e);
                    break;
                case SharedHardCode.CommandName.Active:
                    this.ActiveObject(sender, e);
                    break;
                case RadGrid.ExportToExcelCommandName:
                    this.ExportToExcel(((RadGrid)sender));
                    break;
                case SharedHardCode.CommandName.ExportToPdf:
                    this.ExportToPdf(((RadGrid)sender));
                    break;
            }
        }


   protected void GridView_Pagination(object sender, GridPageChangedEventArgs e)
        {
            this.PaginationHelper((RadGrid)sender);
        }

    protected void GridView_Bind(object dataSource, RadGrid grid)
        {
            grid.DataSource = dataSource;
            grid.DataBind();
            grid.Rebind();

            //Registra controles de exportação como postback
            this.RegisterPostBackControl(ExportToExcelButton);
            }





Eyup
Telerik team
 answered on 22 Aug 2013
4 answers
117 views
I created a grid list. However the UI does not display properly in IE 9. It works in Chrome. Can anyone help me?
Page Code:
<%@ Page Title="" Language="C#" MasterPageFile="~/APPmaster.master" AutoEventWireup="true" CodeFile="FacultyAdvisorBulkUpload.aspx.cs" Inherits="Common.Common_FacultyAdvisorBulkUpload" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript">
        function DownloadTemplate() {
            var url = '../Common/Templates/FacultyAdvisors.csv';
            //location.href = url;
            window.open(url, 'Download');
        }
    </script>
    <script type="text/javascript">
        // This function helps to make the page tab fit the height of RadGrid
        function GridCreated(sender, args) {
            //alert(document.getElementById(sender.get_id()).clientHeight);
            var gridObj = document.getElementById(sender.get_id());
            var tabObj = document.getElementById('<%=RadMultiPage.ClientID %>');
            var searchObj = document.getElementById('search-area');
            tabObj.style.height = (gridObj.clientHeight + searchObj.clientHeight) + 'px';
        }
        // When clicking export, disable the AJAX
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportTo") >= 0) {
                args.set_enableAjax(false);
            }
        }
    </script>
    <br /><br />
    <telerik:RadTabStrip runat="server" ID="RadTabStrip" Skin="Outlook"
        SelectedIndex="0" MultiPageID="RadMultiPage">
        <Tabs>                                       
            <telerik:RadTab Text="Advisor List" ToolTip="View Faculty Advisor Relationship" />
            <telerik:RadTab Text="Advisor Bulk Update" ToolTip="Tool to Import Grades to APP." runat="server" />           
        </Tabs>                                               
    </telerik:RadTabStrip>
    <telerik:RadMultiPage runat="server" ID="RadMultiPage" SelectedIndex="0" CssClass="pageView">
        <telerik:RadPageView runat="server" ID="RadPageView" >           
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Hay">
            </telerik:RadAjaxLoadingPanel>
            <div id="search-area" style="padding:10px 0 20px 0;">
                <b>Faculty Name:</b> <telerik:RadTextBox ID="FacultyNameCond" runat="server" />  <b>Student Name:</b> <telerik:RadTextBox ID="StudentNameCond" runat="server" />  <b>Class:</b> <telerik:RadComboBox ID="ClassCond" runat="server" ViewStateMode="Enabled" />
                  <telerik:RadButton ID="SearchButton" runat="server" Text="Search" OnClick="SearchButton_Click" />
                  <telerik:RadButton ID="ExportButton" runat="server" Text="Export to XLS" OnClick="ExportButton_Click" />
            </div>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="onRequestStart">
                <telerik:RadGrid runat="server" ID="RadGridAdvisorList" Skin="Hay" Width="900px" GridLines="None" OnItemDataBound="RadGridAdvisorList_ItemDataBound"
                     AutoGenerateColumns="False" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="false" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="Small">
                    <PagerStyle Mode="NextPrevAndNumeric" />
                    <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID" PageSize="10" AllowMultiColumnSorting="true">
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="FacultyName" />
                                </GroupByFields>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldName="FacultyName" />
                                </SelectFields>
                            </telerik:GridGroupByExpression>                   
                        </GroupByExpressions>
                        <CommandItemSettings ShowAddNewRecordButton="false" />
                        <Columns>
                            <telerik:GridBoundColumn DataField="FacultyName" HeaderText="Faculty Name" Display="false" />
                            <telerik:GridBoundColumn DataField="FacultyID" HeaderText="Faculty Email" Display="false" />
                            <telerik:GridImageColumn DataType="System.String" DataImageUrlFields="ImageLink"
                                DataImageUrlFormatString="~/Pics/{0}" AlternateText="Student image" DataAlternateTextField="StudentName"
                                ImageAlign="Middle" ImageWidth="57px" ImageHeight="72px" AllowFiltering="false" HeaderStyle-Width="64px" />
                            <telerik:GridBoundColumn DataField="StudentName" HeaderText="Student Name" AllowFiltering="false" HeaderStyle-Width="160px" />
                            <telerik:GridBoundColumn DataField="StudentID" HeaderText="Student ID" AllowFiltering="false" HeaderStyle-Width="90px" />
                            <telerik:GridBoundColumn DataField="Email" HeaderText="Email" AllowFiltering="false" HeaderStyle-Width="160px" />
                            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" AllowFiltering="false" HeaderStyle-Width="160px" />
                            <telerik:GridBoundColumn DataField="Class" HeaderText="Class" AllowFiltering="false" HeaderStyle-Width="90px" />
                            <%--
                            <telerik:GridTemplateColumn>
                                <ItemTemplate>
                                    <input type="image" src="../Styles/Images/Snapshot.gif" alt="Select" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            --%>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings>
                            <Selecting AllowRowSelect="true" />
                            <ClientEvents OnGridCreated="GridCreated" />
                    </ClientSettings>
                </telerik:RadGrid>   
            </telerik:RadAjaxPanel>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="BulkUploadView">               
            <div class="pageTitle"><b>Advisor Bulk Update</b></div>   
            <div id="ContainerDiv" class="legendBorderStaff" style="Height: 200px;">   
                <div class="tabWrapper">       
                    <div class="regularLabel">
                        1. Download Template (if necessary):   
                        <br />   
                        <button id="btnTemplate" onclick="javascript:DownloadTemplate();" title="Download Template" >Download</button>                                                                  
                        <%--<asp:Button ID="Button1" runat="server" Text="Download" ToolTip="Download the proper template." onclick="BtnTemplate_Click" />                   --%>
                        <br /><br />         
                               
                        2. Select the file:
                        <telerik:RadUpload ID="RadUpload" runat="server" Skin="Outlook" AllowedFileExtensions="csv" />
                 
                        <asp:CustomValidator ID="CustomValidator1"
                            runat="server"
                            CssClass="errorLabel"
                            ErrorMessage="Please select at least one CSV file."
                            OnServerValidate="CustomValidator1_ServerValidate">
                        </asp:CustomValidator>
                 
                        <br />
                        3. Submit your file:
                        <br />
                        <asp:Button ID="BtnSumbit" runat="server" Text="Import" ToolTip="Import advisors into APP system." onclick="BtnSumbit_Click" Width="150px" />                         
                    </div
                </div>
            </div>
            <br />
            <div class="errorLabel">        
                <asp:Image ID="SuccessImg" runat="server" ImageUrl="../Images/success.gif" Visible="false" />
                <asp:Image ID="ErrorImg" runat="server" ImageUrl="../Images/error.gif" Visible="false" />
                <asp:Label ID="OutputLabel" ForeColor="Red" runat="server" Visible="false" />
            </div>
            <div class="details" >
                <asp:Label ID="lblReport" runat="server" />
            </div>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
</asp:Content>
Kostadin
Telerik team
 answered on 22 Aug 2013
1 answer
181 views
Hello Friends,
 Facing some problems while working with RadChart to bind data to multiple Y axis I mean more than at least 2.
PFA the Line Chart I want to design. Expecting some response. 1, 2, 3, in image are my three y axis.

Thank you,
Goraksh
Delmon solutions Epao-team.
Danail Vasilev
Telerik team
 answered on 22 Aug 2013
1 answer
59 views
Hello.  Is there a way to tell the editor to block certain html tags such as embed, object, iframe, img, etc?    I've got AllowScripts = false turned on, and that works for blocking <script> tags, but I would like to be able to block other tags as well.

Thank you!
Marin Bratanov
Telerik team
 answered on 22 Aug 2013
2 answers
130 views
Hello all.

I try to ajaxify a combobox with automatic load on demand.

The definition in the AJAX manager:
<telerik:AjaxSetting AjaxControlID="MatCompAddComponentButton">
  <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="PanelMatComp" UpdatePanelCssClass="" />
  </UpdatedControls>
</telerik:AjaxSetting>

The PanelMatComp:
<asp:Panel ID="PanelMatComp" runat="server" Visible="false">
    <telerik:OpenAccessDataSource ID="OpenAccessDataSourceItems" runat="server" ObjectContextProvider="idee5.DispatcherModel.DispatcherEntities, idee5.DispatcherModel" TypeName="idee5.DispatcherModel.Item" Where="this.MasterSystemHierarchy == @MasterSystemHierarchy">
        <WhereParameters>
            <asp:QueryStringParameter Name="MasterSystemHierarchy" QueryStringField="Hierarchy" />
        </WhereParameters>
    </telerik:OpenAccessDataSource>
    <asp:CheckBox ID="MatCompComplete" runat="server" Enabled="False" Text="Komplettentnahme" />
    <telerik:RadComboBox ID="MatCompItemComboBox" Runat="server" Culture="de-DE" DataSourceID="OpenAccessDataSourceItems" DataTextField="Label" DataValueField="Id" EmptyMessage="Bitte Artikel auswählen" EnableAutomaticLoadOnDemand="True" ItemsPerRequest="10" Label="Artikel" LoadingMessage="Lade..." AutoPostBack="True" ShowMoreResultsBox="True" EnableVirtualScrolling="True" Filter="Contains" Height="180px" Width="250px" CausesValidation="False" EnableItemCaching="True">
    </telerik:RadComboBox>
...
</asp:Panel>

Reaching the point where the panel is shown I get the following error message. Disabling AJAX in the Rad AJAX manager works fine.
"Das Objekt unterstützt die Eigenschaft oder Methode "toUpperCase" nicht"

It seems to be the first call of registerEnum. But I have no idea what is wrong. All other controls work fine.
a.RadComboBoxItemDataBoundEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs",a.RadComboBoxItemEventArgs);
})();
(function(){var a=$telerik.$;
var b=Telerik.Web.UI;
a.registerEnum(b,"Keys",{Tab:9,Enter:13,Shift:16,Escape:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Insert:45,Del:46,Zero:48,Numpad0:96,Numpad9:105,F1:112,F12:123,Delete:127});
a.registerEnum(b,"RadComboBoxFilter",{None:0,Contains:1,StartsWith:2});
a.registerEnum(b,"RadComboBoxExpandDirection",{Up:1,Down:2});
a.registerEnum(b,"RadComboBoxCheckedItemsTexts",{FitInInput:0,DisplayAllInInput:1});
a.registerEnum(b,"RadComboBoxDropDownAutoWidth",{Disabled:0,Enabled:1});
})();
$telerik.findComboBox=$fi

Any help is appreciated
Bernd
Marin
Telerik team
 answered on 22 Aug 2013
1 answer
255 views
Server Error in '/' Application.
  
FieldEditors collection is empty.
  
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  
Exception Details: System.NullReferenceException: FieldEditors collection is empty.
  
Source Error:
  
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
  
Stack Trace:
  
  
[NullReferenceException: FieldEditors collection is empty.]
   Telerik.Web.UI.RadFilterDataFieldEditorCollection.System.Collections.Generic.IList<Telerik.Web.UI.RadFilterDataFieldEditor>.get_Item(Int32 index) +156
   Telerik.Web.UI.RadFilter.AddChildExpression(RadFilterGroupExpressionItem groupItem, Boolean isGroup) +118
   Telerik.Web.UI.RadFilterCommandEventArgs.ExecuteCommand(Object source) +173
   Telerik.Web.UI.RadFilter.OnBubbleEvent(Object source, EventArgs args) +185
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70
   Telerik.Web.UI.RadFilterExpressionItem.OnBubbleEvent(Object source, EventArgs args) +131
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

I received the above error trying to dynamically create Rad Filters.  The error occurs on Postback when selecting to add a new filter expression.

I am using Telerik.Web.UI, Version=2013.1.403.35.

protected void Page_Load(object sender, EventArgs e)
{
    if (string.IsNullOrEmpty(this.FilterType))
        throw new NullReferenceException("FilterType must not be undefined.");
 
    var instance = Activator.CreateInstance("MyDLL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=123456789", "MyDLL.Data.Biz.MetaData." + this.FilterType);
 
    PropertyInfo[] properties = instance.GetType().GetProperties(
        BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public);
 
    foreach (PropertyInfo p in properties)
    {
 
        RadFilterDataFieldEditor f = null;
 
        if (p.PropertyType == typeof(int))
        {
            f = new RadFilterNumericFieldEditor();
        }
 
        if (p.PropertyType == typeof(bool))
        {
            f = new RadFilterBooleanFieldEditor();
        }
 
        if (p.PropertyType == typeof(DateTime))
        {
            f = new RadFilterDateFieldEditor();
        }
 
        if (p.PropertyType == typeof(string))
        {
            f = new RadFilterTextFieldEditor();
        }
 
 
        if (f != null)
        {
            filter.FieldEditors.Add(f);
        }
 
        if (!Page.IsPostBack)
        {
            if (p.PropertyType == typeof(int))
            {
                f.DisplayName = p.Name.HumanizeString();
                f.DataType = typeof(int);
                f.FieldName = p.Name;
                f.ToolTip = p.Name;
            }
 
            if (p.PropertyType == typeof(bool))
            {
                f.DisplayName = p.Name.HumanizeString();
                f.DataType = typeof(bool);
                f.FieldName = p.Name;
                f.ToolTip = p.Name;
            }
 
            if (p.PropertyType == typeof(DateTime))
            {
                f.DisplayName = p.Name.HumanizeString();
                f.DataType = typeof(DateTime);
                f.FieldName = p.Name;
                f.ToolTip = p.Name;
            }
 
            if (p.PropertyType == typeof(string))
            {
                f.DisplayName = p.Name.HumanizeString();
                f.DataType = typeof(string);
                f.FieldName = p.Name;
                f.ToolTip = p.Name;
            }
        }
    }
}

Thanks for any insight.

Antonio Stoilkov
Telerik team
 answered on 22 Aug 2013
3 answers
334 views

Hi

I have a RadListView bound to an EntityDataSource. Within the ItemTemplate I then have a RadButton with a ContentTemplate.

The RadButton is defined as follows (within the ListView ItemTemplate):

 <telerik:RadButton ID="VehicleRadButton" runat="server" ButtonType="StandardButton"

                                     AutoPostBack="true" GroupName="radVehicle"  CommandName="Select"

                                     ToggleType="Radio" Text='<%# String.Format("{0}", Eval("f1")) %>'>                             

                                     <ContentTemplate>

                                         <%# String.Format("[{0}]", Eval("f2")) %>

                                     </ContentTemplate>

 </telerik:RadButton>

 When I do this an error occurs:

Unable to cast object of type 'Telerik.Web.UI.RadButton' to type 'Telerik.Web.UI.RibbonBarTemplateItem'.

Is it possible to do this?

Thanks

Tony

Danail Vasilev
Telerik team
 answered on 22 Aug 2013
1 answer
68 views
imagine i have

DataKeyNames="CollectionId, ClaimTypeId"

Do i need a

 <telerik:GridBoundColumn DataField="claimtypeid" UniqueName="claimtypeid" HeaderStyle-HorizontalAlign="Center"
                                        HeaderText="claimtypeid" Visible="false">
                                    </telerik:GridBoundColumn>

??
notice the visible = false

Princy
Top achievements
Rank 2
 answered on 22 Aug 2013
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?