Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
336 views
Hi,

I'm trying to follow this tutorial:-
http://www.telerik.com/help/aspnet-ajax/schedule_advancedformtemplate.html
Sample downloaded SchedulerCustomAdvancedFormQ2__SP1_2009.zip

I've created my own project etc and keep getting this error:-
object does not support this property or method.
When I debug it points to line 5?
    <script type="text/javascript">  
        //<![CDATA[
        function schedulerFormCreated(scheduler, eventArgs) {
            var mode = eventArgs.get_mode();
            if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
                    mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
                // Initialize the client-side object for the advanced form
                var schedulerElement = scheduler.get_element();
                var formElement = eventArgs.get_formElement();
                var isModal = scheduler.get_advancedFormSettings().modal;
                var advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
                advancedTemplate.initialize();
                // Are we using Web Service data binding?
                if (!scheduler.get_webServiceSettings().get_isEmpty()) {
                    // Populate the form with the appointment data
                    var apt = eventArgs.get_appointment();
                    var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
                    var editSeries = eventArgs.get_editingRecurringSeries();
                    advancedTemplate.populate(apt, isInsert, editSeries);
                }
            }
        }
        //]]> 
    </script> 

I've double checked my code etc and can't see what has gone wrong. When I click on recurrence nothing happens, the same error appears (when in debug mode).

I then went to the sample project and ran that and the same error occurs. Can any one help?

Many thanks
Daniel
Top achievements
Rank 1
 answered on 25 May 2011
1 answer
100 views
Is there a way to have the schedular automatically scroll to a certain time on page load when in Day/Week view?

e.g. If the full 24 hours of a day are being displayed, the scheduler shows from 12:00am when the page first loads. Can you make it so the scheduler shows from 8:00am onwards but still be able to scroll back to view the previous hours?

Thanks
Plamen
Telerik team
 answered on 25 May 2011
3 answers
54 views
I've implemented the RadAjaxPanel on my ascx page. using the method described here http://www.telerik.com/help/aspnet-ajax/ajax-loadingpanel-animation.html

Everything appears to be working within the ascx page except the datalist on the master page never displays. If I remove the RadAjaxLoadingPanel from the ascx page the datalist functions as expected.

Any ideas? Or places to start looking?

<script type="text/javascript">
    function MyClientShowing(sender, args) {
        document.title = "show " + new Date(); args.get_loadingElement().style.border = "2px solid red"; args.set_cancelNativeDisplay(true);
        $telerik.$(args.get_loadingElement()).show("slow");
    }
    function MyClientHiding(sender, args) {
        document.title = "hide " + new Date(); args.get_loadingElement().style.border = "2px solid blue"; args.set_cancelNativeDisplay(true);
        $telerik.$(args.get_loadingElement()).hide("slow");
    }
</script>
</telerik:RadCodeBlock>
  
<style type="text/css">
    .hiddencol
    {
        display:none;
    }
    .viscol
    {
        display:block;
    }
</style>
  
  
<asp:Panel ID="pnl_CartContent" runat="server" cssclass="collapsePanel" Height="100%">
<table width="264"> ... </table>
</asp:Panel>
  
<ACTK:AlwaysVisibleControlExtender ID="avce_Cart" runat="server" TargetControlID="pnl_CartContent" VerticalSide="Top" VerticalOffset="225" HorizontalSide="Left" HorizontalOffset="650" ScrollEffectDuration=".1"  />
                      
                  <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" OnClientShowing="MyClientShowing" OnClientHiding="MyClientHiding" />
                        <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
                            <AjaxSettings>
                                <telerik:AjaxSetting AjaxControlID="btn_Search">
                                    <UpdatedControls>
                                        <telerik:AjaxUpdatedControl ControlID="pnl_SearchHeaderMain" />
                                    </UpdatedControls>
                                </telerik:AjaxSetting>
                            </AjaxSettings>
                    </telerik:RadAjaxManager
  
<asp:Panel id="pnl_SearchHeaderMain" runat="server">
<div>...</div>
</asp:Panel>
Maria Ilieva
Telerik team
 answered on 25 May 2011
3 answers
236 views
Hello all,

I am running into a very interesting issue and I was hoping one of you coud help.  It appears that paging with an object datasource works perfectly with sorting, but as soon as I try to implement custom filtering, paging appears to not take the "SelectCount" method on the object datasource using the number of records returned as to total number of records.

I cannot use the Enable Linq expressions as it does not meet my needs for the Entity Framework selects I am performing so I have created my on linq predicate parser based on the filter expressions provided by Telerik.

I have defined the following RadGrid:

<telerik:RadGrid ID="rgProjects" runat="server" CommandItemDisplay="Top"
        GridLines="None" AllowCustomPaging="True" AllowPaging="true"  PagerStyle-AlwaysVisible="true"
        PageSize="10" CellSpacing="0" AllowFilteringByColumn="True" EnableLinqExpressions="false"
        AllowSorting="True" AutoGenerateColumns="False" DataSourceID="dsProjects" 
        onitemcommand="rgProjects_ItemCommand" >
        <MasterTableView EditMode="InPlace" CommandItemDisplay="None" OverrideDataSourceControlSorting="true" PagerStyle-AlwaysVisible="true">
            <NoRecordsTemplate>
                <asp:Label ID="lbNoUsers" runat="server" 
                    Text="There are currently no Project records in the system."></asp:Label>
            </NoRecordsTemplate>
            <Columns>
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="ProjectKey"
                    DataNavigateUrlFormatString="~/ProjectCreation/CreateProject.aspx?NK=3&P={0}" 
                    DataTextFormatString="Project {0}" DataTextField="ProjectKey"
                    FilterControlAltText="Filter column column" HeaderText="Project" 
                    UniqueName="ProjectKey" SortExpression="PROJECT_KEY">
                </telerik:GridHyperLinkColumn>
                <telerik:GridTemplateColumn FilterControlAltText="Filter PrimaryClientNumber column" HeaderText="Primary Client Number"
                    UniqueName="PrimaryClientNumber" SortExpression="PRIMARY_CLIENT.CLIENT_NUMBER">
                    <ItemTemplate>
                        <MlCts:SecuredLabel ID="lbPrimaryClientNumber" runat="server" BindingObjectTextPropertyName="ClientNumber" BindingPath=".PrimaryClient"></MlCts:SecuredLabel>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
..removed for brevity
                <telerik:GridTemplateColumn FilterControlAltText="Filter SecondaryMatterName column" HeaderText="Secondary Matter Name"
                    UniqueName="SecondaryMatterName" SortExpression="SECONDARY_MATTERMATTER_NAME">
                    <ItemTemplate>
                        <MlCts:SecuredLabel ID="lbSecondaryMatterName" runat="server" BindingObjectTextPropertyName="MatterDescription" BindingPath=".SecondaryMatter"></MlCts:SecuredLabel>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings EditColumn-ButtonType="ImageButton"
                EditColumn-Display="false" EditColumn-Visible="true" 
                EditFormType="AutoGenerated">
                <EditColumn ButtonType="ImageButton" Display="False">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>

Using the  the following data source:

<asp:ObjectDataSource ID="dsProjects" EnablePaging="true" MaximumRowsParameterName="PageSize"
    SelectCountMethod="SelectCount" StartRowIndexParameterName="CurrentRowIndex"
 TypeName="PTDSA.DataSources.ProjectDatasource" SortParameterName="SortParam"
runat="server" OldValuesParameterFormatString="original_{0}" 
    SelectMethod="Select" onselecting="dsProjects_Selecting">
    <SelectParameters>
        <asp:Parameter Name="FilterOperation" Type="String" />
        <asp:Parameter Name="FilterValue" Type="Object" />
    </SelectParameters>
</asp:ObjectDataSource>


I have defined the 2 events in the code behind as follows:

object _filtervalue = null
string _filterpredicate = null
string _operation = null
protected void dsProjects_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) 
    e.Arguments.MaximumRows = rgProjects.MasterTableView.PageSize; 
    if (_filtervalue != null
    
        if (_operation == "NoFilter"
        
            _filtervalue = null
            _filterpredicate = null
        
        e.Arguments.StartRowIndex = 0; 
        e.InputParameters["FilterOperation"] = _filterpredicate; 
        e.InputParameters["FilterValue"] = _filtervalue; 
    
protected void rgProjects_ItemCommand(object sender, GridCommandEventArgs e) 
    if (e.Item != null
    
        if (e.Item.ItemType == GridItemType.FilteringItem) 
        
            Pair filterPair = e.CommandArgument as Pair; 
            if (filterPair != null
            
                GridColumn currentCol = e.Item.OwnerTableView.GetColumn(filterPair.Second.ToString()); 
                if (currentCol != null
                
                    _filtervalue = Convert.ChangeType(currentCol.CurrentFilterValue, currentCol.DataType); 
                              
                    //This is my custom linq predicate creation
                    _filterpredicate = e.GetDynamicLinqFilter(currentCol.SortExpression, false); 
                    _operation = filterPair.First.ToString(); 
                
            
        
    
The object data source DataObject is very simple:

[DataObject(true)]
  public class ProjectDatasource
  {
      public Project[] Select(
          string FilterOperation,
          object FilterValue,
          string SortParam,
          int PageSize,
          int CurrentRowIndex
          )
      {
          using (...Custom Data Provider)
          {
              string sortBy = String.IsNullOrWhiteSpace(SortParam) ? "PROJECT_KEY" : SortParam;
              sortBy = Utilities.getSortParamName(sortBy);
              bool isAscending = Utilities.getIsAscending(sortBy);
              Project[] returnItems =  dataProvider.GetProjectsBySearchParams(PageSize,
                  CurrentRowIndex,
                  sortBy,
                  isAscending,
                  FilterOperation,
                  FilterValue
                    
                      );
              return returnItems;
          }
      }
      public int SelectCount(
          string FilterOperation,
          object FilterValue)
      {
          using (..Custom Data Provder)
          {
              return dataProvider.GetProjectsBySearchParamsCount(
                  FilterOperation,
                  FilterValue
                      );
          }
      }
  }


I am hoping you can help in this matter as it is quite a road block for several of the pages we would like to implement.

Thank you
Tsvetoslav
Telerik team
 answered on 25 May 2011
3 answers
113 views
Hello
I have custom control (ascx) for change password:
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" %>
<telerik:RadAjaxPanel ID="pnlChangePassword" runat="server" DefaultButton="btnChange" LoadingPanelID="ralMain">
    <div class="box" style="width: 445px;">
        <fieldset>
            <asp:Label ID="lblOldPassword" AssociatedControlID="txbOldPassword" runat="server" Text="<%$ Resources: Common, OldPassword_label %>" />
            <asp:TextBox ID="txbOldPassword" TextMode="Password" runat="server" MaxLength="100" />       
        </fieldset>
        <fieldset>
            <asp:Label ID="lblPassword" AssociatedControlID="txbPassword" runat="server" Text="<%$ Resources: Common, NewPassword_label %>" />
            <asp:TextBox ID="txbPassword" TextMode="Password" runat="server" MaxLength="100" />        
        </fieldset>
        <fieldset>
            <asp:Label ID="lblConfirmPassword" AssociatedControlID="txbConfirmPassword" runat="server" Text="<%$ Resources: Common, NewPasswordConfirm_label %>" />
            <asp:TextBox ID="txbConfirmPassword" TextMode="Password" runat="server" MaxLength="100" />         
        </fieldset>
    </div>
    <div>
        <asp:Button ID="btnChange" runat="server" CssClass="button" Text="<%$ Resources: Common, ChangePassword_button %>" OnClick="HandlerButtonOnClick" />
    </div>
</telerik:RadAjaxPanel>
Which is loaded on other custom control (ascx) with folowing code

<script type="text/javascript">
    //<![CDATA[
    function CloseWin() {
        $find('<%= changePasswordWindow.ClientID %>').close();
    }
    function OpenWin() {
        $find('<%= changePasswordWindow.ClientID %>').show();
    }
    //]]>
</script>
<telerik:RadWindow ID="changePasswordWindow" Title="<%$ Resources: Common, ChangeYourPassword_title %>" runat="server" Modal="true" Behavior="Close" EnableShadow="true" Width="530px"
    Height="300px" VisibleStatusbar="false">
    <ContentTemplate>
        <div style="margin: 10px;">
            <ref:ChangePassword ID="changePassword" runat="server" />
        </div>
        <asp:LinkButton ID="btnBack" runat="server" Text="<%$ Resources: Common, Close_label %>" CausesValidation="false" OnClientClick="CloseWin();return false;" />
    </ContentTemplate>
</telerik:RadWindow>
this windows is opened with button:
<asp:Button ID="btnChange" runat="server" CssClass="button" Text="<%$ Resources: Common, ChangePassword_button %>" CausesValidation="false" OnClientClick="OpenWin();return false;" />

Now when I press change button on window, ajax panel is not showing. Wait cursor is not loading. How can I fix it.
Marcin

P.S.
If I put validators inside this change password control, they are fired also if window is not shown. And vice versa. If window is shown it firering also validators on parent control. Is it any way to prevent that?
Marcin
Top achievements
Rank 1
Veteran
 answered on 25 May 2011
1 answer
39 views
i have created a webpage using telerik control, now i am not able to open control on desing mode, so please help me...


Thanks
Mukesh Mishra
Shinu
Top achievements
Rank 2
 answered on 25 May 2011
4 answers
124 views
Hi,

I'm using a WCF web service to load nodes on demand.
The WCF web service method is called and complete in less thant 2 seconds, then it takes more thant 2 minutes for nodes (between 1 to 10 nodes) to be added to  the treeview !!!

I'm using .Net 4 on Win7 x64 and IIS 7.5

Any ideas/suggestions ?
Cedric
Top achievements
Rank 1
 answered on 25 May 2011
4 answers
91 views
In the advancedForm, when we select the start date and Time, the Time slot menu (with 30 minute interval) has two columns of times. However Since I have a requirement to show time from 00:00 AM to 11:30PM, the popup goes beyond my webpage frame height. Is it possible to have 3 columns or 4 columns for the time so that the height can be reduced?

Thanks
Sanjeev
Jayesh Goyani
Top achievements
Rank 2
 answered on 25 May 2011
4 answers
223 views
<head runat="server">
    <title></title>
     
 
<style type="text/css"
div.RadComboBox_Default table .rcbInputCell,
div.RadComboBox_Default table .rcbArrowCell 
    background-color: red; 
    height: 11px;  
    line-height: 10px;
    padding: 0;
  
div.RadComboBox_Default table .rcbInputCell input
{
    height: 11px;
    line-height: 10px;
    font:10px arial,verdana,sans-serif;
    height: 11px;
    padding: 0;
}
  
.rcbInput
{
    height: 11px !important;
}
</style
 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
 
        <telerik:RadComboBox ID="RadComboBox1" runat="server" >
            <Items>
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
            </Items>
        </telerik:RadComboBox>       
        <telerik:RadTextBox ID="RadTextBox1" runat="server" Height="11px"></telerik:RadTextBox>
        <br/> <br/> <br/>
        <telerik:RadComboBox ID="RadComboBox2" runat="server" EnableEmbeddedSkins="false" >
            <Items>
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
                <telerik:RadComboBoxItem text="12345" />
            </Items>
        </telerik:RadComboBox>
        <telerik:RadTextBox ID="RadTextBox2" runat="server" Height="11px"></telerik:RadTextBox>
        
    </div>
    </form>
    
 
</body>
</html>
Hello SIr/Mam

I'm wanted to set the height of the textbox of the RadComboBox to 11 px.
I have read and tried the code posted on forum(http://www.telerik.com/community/forums/aspnet-ajax/combobox/how-to-set-the-height-of-the-textbox-of-the-radcombobox.aspx) But still i'm not able to set its height .
Please help me out from this problem, Any help will be greatly appreciated.


Regards
Sunil
Sunil
Top achievements
Rank 1
 answered on 25 May 2011
2 answers
130 views
Version: 2010.2.826.35
Replicate steps,
1. Input some text in the editor
2. Select the text and choose a Font size, for example: 5 and then font size will be changed
3. Choose a real Font size, for example: 10px and then font size will be changed too
4. Problem is here: when you choose a Font size again, for example: 6, it doesn't work.

Could anyone help look into this?
Code is here,
<Telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</Telerik:RadScriptManager>
<Telerik:RadEditor ID="RadEditorProductDetails" runat="server" EditModes="Design, Html" Skin="Windows7">
    <Tools>
        <Telerik:EditorToolGroup>
            <Telerik:EditorTool Name="FontName" />
            <Telerik:EditorTool Name="FontSize" />
            <Telerik:EditorTool Name="RealFontSize" />
        </Telerik:EditorToolGroup>
    </Tools>
    <Content>
    </Content>
</Telerik:RadEditor>

Thanks so much.
yunpeng
Top achievements
Rank 1
 answered on 25 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?