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

I am creating a custom control(.dll) which has RadTextBox, Rad combo box having gird(_grd2) as its Item and a Image button which opens radwindow having another grid(_grd1).

My requirement is that onKeypress i.e., based on character entered in combobox text, content of grid(_grd2)  (which is available as item in combobox) need to be filtered and displayed .

To achieve this i am using Item requested event where i am setting grid’s(_grd2)filter expression but getting following error popup immediately after ItemsRequested event procedure.

 “Script control xxx(i.e.,_grd2) is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors()

Parameter name: scriptControl”

Please suggest  me way to resolving this issue.

As a note that

1)       using script manager in aspx where custom control is consumed.

2)      I approached following ways but none of them worked
I tried using RadScriptManger instead of aspx scriptamanager but still I got same error.

Same error is poping up even on use of OnClientItemRequesting and OnClientItemRequested events.

When I made _grd2.RegisterWithScriptManager = false;  and combobox.RegisterWithScriptManager = false then ItemRequested event is fired and grid got filtered with filter expression applied but none of filtered rows are selectable i.e., postback is not happening during row click of radgrid(_grd2) , infact row click is not happening and item command is not fired.

RadAjaxManagerProxy _ramMangagerProxy = new RadAjaxManagerProxy();
_ramMangagerProxy.ID = "RadAjaxManager";
_ramMangagerProxy.ClientIDMode = ClientIDMode.AutoID;
 
RadAjaxLoadingPanel _ralLoadingPanel = new RadAjaxLoadingPanel();
_ralLoadingPanel.ID = "RadAjaxLoadPanel";
_ralLoadingPanel.ClientIDMode = ClientIDMode.AutoID;
 
AjaxSetting _settings = new AjaxSetting();
_settings.AjaxControlID = _grd1.ID;
 
AjaxUpdatedControl _id = new AjaxUpdatedControl();
_id.ControlID = _grd1.ID;
_id.LoadingPanelID = _ralLoadingPanel.ID;
 
_settings.UpdatedControls.Add(_id);
_ramMangagerProxy.AjaxSettings.Add(_settings);
 
RadGrid _grd2 = new RadGrid();
_grd2.ID = “Grd2”;
_grd2.ClientIDMode = ClientIDMode.AutoID;
_grd2.NeedDataSource += new GridNeedDataSourceEventHandler(Grd2_NeedDataSource);
_grd2.ClientSettings.Selecting.AllowRowSelect = true;
_grd2.EnableLinqExpressions = false;
_grd2.RegisterWithScriptManager = true;
_grd2.ItemCommand += new GridCommandEventHandler(Grd2_GridItemCommand);
 
RadComboBox  _drdComboBox = new RadComboBox();
_drdComboBox.ID =“ DrdComboBox”;
_drdComboBox.CssClass = DrdComboBoxCss;
_drdComboBox.AllowCustomText = true;
_drdComboBox.AutoPostBack = false;
_drdComboBox.MarkFirstMatch = true;
_drdComboBox.EnableLoadOnDemand = true;
_drdComboBox.ClientIDMode = ClientIDMode.AutoID;
_drdComboBox.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(_drdComboBox_ItemsRequested);
 
RadComboBoxItem item = new RadComboBoxItem();
item.Controls.Add(_grd2);
_drdComboBox.Items.Add(item);
 
protected void Grd2_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
 
_grd2. DataSource = dataTable (or) dataset (or) list;
 
}
 
protected void Grd2_GridItemCommand(object sender, GridCommandEventArgs e)
{
 
// code regarding row click.
 
}
 
protected void _drdComboBox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
if (e.Text != "")
{
this._grd2.MasterTableView.FilterExpression = "([Col] LIKE 'txt %')";
_grd2.MasterTableView.Rebind();
}
}

Can you please help me in finding best solution for this issue.
Helen
Telerik team
 answered on 17 Feb 2011
2 answers
143 views
i am trying to update my literal control. so everytime i select a value on dropdownlist, the literal content will change. the problem is that the content of the literal is all javascript because it is a script to draw chart from Fusion Chart (third party control).

It works great on the first time visit. but if dropdownlist selected index is changed, and is in asyncpostback, it just wont work. the literal will update if i onlyl put text in there. So my question is that how do i register javascript and write it to literal then make it works when asyncpostback is called. something like registerscriptcodeblock? pelase help me thank you very much.

literal1.Text = FusionCharts.RenderChart(c
harttype.ToString, "", chartData.ToString, "FactorySum", "798", "300", False, False)

that works fine.

now i click update  and it should update the literal which it does but it just can't see the script inside of that. the fusioncharts.renderchart() return
<!-- START Script Block for Chart FactorySum --> 
<div id='FactorySumDiv' > 
Chart. 
</div> 
<script type="text/javascript"
var chart_FactorySum = new FusionCharts("FusionCharts/MSColumn3D.swf""FactorySum""798""300""0""0""""noScale""EN" ); 
chart_FactorySum.setDataXML("<chart caption='Test' xAxisName='X Value' yAxisName='Y Value' showValues='0'><categories><category label='8/6/2006'/><category label='8/7/2006'/><category label='8/8/2006'/><category label='8/9/2006'/><category label='8/10/2006'/><category label='8/11/2006'/><category label='8/12/2006'/></categories><dataset seriesName='Offline Marketing' color='1D8BD1' anchorBorderColor='1D8BD1' anchorBgColor='1D8BD1'><set value='1327'/><set value='1826'/><set value='1699'/><set value='1511'/><set value='1904'/><set value='1957'/><set value='1296'/></dataset></chart>"); 
chart_FactorySum.render("FactorySumDiv"); 
</script> 
<!-- END Script Block for Chart FactorySum --> 
 

and the only thing that i see there is the word Chart.
<div id='FactorySumDiv' > 
Chart. 
</div> 


 and i want that to be in literal and work just like the way it is working when you first load the page.
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Sales Report</title> 
    <script type="text/javascript" src="FusionCharts/FusionCharts.js"></script> 
    <script type="text/javascript"
        function RequestStart(sender, eventArgs) 
        { 
            var divElementStyle = document.getElementById("RadAjaxLoadingPanel1").style; 
            divElementStyle.position = 'absolute'; 
            //position the loading panel 
            divElementStyle.left = eventArgs.get_eventTargetElement().offsetLeft + "px"
            divElementStyle.top = eventArgs.get_eventTargetElement().offsetTop + "px"
        } 
   </script> 
</head> 
<body style="background-color:#3d766f; font-family:Verdana; font-size:12px;"
    <form id="form1" runat="server">         
        <telerik:radscriptmanager id="RadScriptManager1" runat="server" AsyncPostBackTimeout="0"/> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2007" DecoratedControls="All" /> 
        <telerik:radajaxmanager id="RadAjaxManager1" runat="server">             
            <ClientEvents OnRequestStart="RequestStart"></ClientEvents> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadTabStrip1"
                    <UpdatedControls>                         
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />  
                        <telerik:AjaxUpdatedControl ControlID="lt_HourlyGraph" LoadingPanelID="RadAjaxLoadingPanel1" />                        
                    </UpdatedControls> 
                </telerik:AjaxSetting>                       
                <telerik:AjaxSetting AjaxControlID="ddlcharttype"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Panel_HourlyGraph" LoadingPanelID="RadAjaxLoadingPanel1" />                         
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:radajaxmanager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="1000"
            <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" /> 
        </telerik:RadAjaxLoadingPanel> 
        <asp:Table ID="main" runat="server" BorderColor="white" BackColor="white" BorderWidth="0" CellPadding="5" CellSpacing="0" Width="1024px"  Height="100%" HorizontalAlign="center"
            <asp:TableRow> 
                <asp:TableCell VerticalAlign="top" Width="220px"
                    <b>Company Report:</b><br /><br />                   
                    <telerik:RadComboBox ID="ddlCompanyReport" Font-Size="12px" Width="200px" AutoPostBack="true" runat="server" Skin="Web20" /><br /><br /><br /> 
                    <b>Build your own:</b><br /><br /> 
                    <telerik:RadComboBox ID="ddlAdhocReport" Font-Size="12px" Width="200px" AutoPostBack="true" runat="server" Skin="Web20" /> 
                </asp:TableCell> 
                <asp:TableCell VerticalAlign="top" Width="798px"
                    <asp:Table ID="tbl_hourlyparam" runat="server" Width="798px"
                        <asp:TableRow> 
                            <asp:TableCell VerticalAlign="top"
                                <table border="0" cellpadding="5" cellspacing="0" width="798px"
                                    <tr> 
                                        <td align="center"
                                            Previous Year: <telerik:RadDatePicker Font-Size="12px" Calendar-ShowColumnHeaders="false" Calendar-ShowRowHeaders="true" 
                                                    ID="txt_hourlyFrom" runat="server" Skin="Web20" />    
                                            Current Year: <telerik:RadDatePicker Font-Size="12px" Calendar-ShowColumnHeaders="false" Calendar-ShowRowHeaders="true" 
                                                    ID="txt_hourlyTo" runat="server" Skin="Web20" /> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td width="798px">                                             
                                            <telerik:RadComboBox ID="ddlcharttype" Font-Size="12px" runat="server" Skin="Web20" AutoPostBack="true">                                                                                                 
                                                    <Items> 
                                                        <telerik:RadComboBoxItem Text="Select a chart type" Value="" /> 
                                                        <telerik:RadComboBoxItem Text="Area" Value="Area" /> 
                                                        <telerik:RadComboBoxItem Text="Bar" Value="Bar" /> 
                                                        <telerik:RadComboBoxItem Text="Column" Value="Column" /> 
                                                        <telerik:RadComboBoxItem Text="Line" Value="Line" /> 
                                                    </Items> 
                                            </telerik:RadComboBox> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td>  
                                            <asp:Panel ID="Panel_HourlyGraph" runat="server"
                                                <asp:Literal ID="lt_HourlyGraph" runat="server"></asp:Literal>                                                                                    
                                            </asp:Panel>                                                        
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td> 
                                            <telerik:RadTabStrip ID="RadTabStrip1" ReorderTabsOnSelect="true"  runat="server" Skin="Office2007"  
                                                MultiPageID="RadMultiPage1" SelectedIndex="0"
                                                <Tabs> 
                                                    <telerik:RadTab Text="Norwalk" runat="server" Selected="True" />                            
                                                    <telerik:RadTab Text="Danbury" runat="server" /> 
                                                    <telerik:RadTab Text="Yonkers" runat="server" /> 
                                                    <telerik:RadTab Text="Newington" runat="server" /> 
                                                </Tabs> 
                                            </telerik:RadTabStrip> 
                                            <telerik:RadMultiPage style="border: 1px solid #828282; padding: 40px 10px 25px;" runat="server" ID="RadMultiPage1" SelectedIndex="0"
                                                <telerik:RadPageView runat="server" ID="RadPage_Norwalk">                                              
                                                      <asp:Literal ID="Hourly_NOR" runat="server"  /> 
                                                </telerik:RadPageView>  
                                                <telerik:RadPageView ID="RadPage_Danbury" runat="server"
                                                    <asp:Literal ID="Hourly_DAN" runat="server" /> 
                                                </telerik:RadPageView> 
                                                <telerik:RadPageView ID="RadPage_Yonkers" runat="server"
                                                    <asp:Literal ID="Hourly_YON" runat="server" /> 
                                                </telerik:RadPageView> 
                                                <telerik:RadPageView ID="RadPage_Newington" runat="server"
                                                    <asp:Literal ID="Hourly_NWG" runat="server" /> 
                                                </telerik:RadPageView> 
                                             </telerik:RadMultiPage>     
                                        </td> 
                                    </tr> 
                                </table>                                 
                            </asp:TableCell> 
                        </asp:TableRow> 
                    </asp:Table> 
                </asp:TableCell> 
            </asp:TableRow> 
            <asp:TableRow> 
                <asp:TableCell ColumnSpan="2" BackColor="gray" Width="798px" ForeColor="white" HorizontalAlign="center"
                   © 2009 All Rights Reserved. 
                </asp:TableCell> 
            </asp:TableRow>     
        </asp:Table> 
    </form> 
</body> 
</html> 
 
 
server side is 
 Protected Sub ddlcharttype_SelectedIndexChanged(ByVal o As ObjectByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ddlcharttype.SelectedIndexChanged 
        Dim charttype As String = GetChartType() 
        Dim chartData As String = GetFactorySummaryChartHtm() 
        lt_HourlyGraph.Text = FusionCharts.RenderChart(charttype.ToString, "", chartData.ToString, "FactorySum""798""300"FalseFalse
    End Sub 
Yana
Telerik team
 answered on 17 Feb 2011
3 answers
337 views
Hello,

is there a way to show dropdown list above the textbox when i click on the arrow? 

Thanks,
Max
Max
Top achievements
Rank 1
 answered on 17 Feb 2011
3 answers
136 views
Hello,

I have a SlidingZone which load content on demand. The SlidingPanes open, when the user moves the mouse over a tab. In common the user do not hit the right tab and moves the mouse to the desired tab. Now every tab, the user moves over, is opening and starting a ajax-request for loading its content. So my question, how can I configure a delay before the expanding is started?

<telerik:RadPane ID="RightPane" runat="server" Width="22px" Scrolling="None">
    <telerik:RadSlidingZone ID="SlidingZone1" runat="server" Width="22px" SlideDirection="Left"
        ClickToOpen="false" >                        
        <telerik:RadSlidingPane ID="RadSlidingPane2" Title="Lokal" ToolTip="Lokale Gruppen"
            runat="server" Width="355px" IconUrl="/images/folder.png" OnClientExpanded="LoadLocalGroup" EnableDock="false">
            <asp:Panel ID="PanelLocal" runat="server" Height="100%">
                <twoeyes:LocalGroupAllocation ID="alloc_LocalGroup" runat="server" />
            </asp:Panel>
        </telerik:RadSlidingPane>
        <telerik:RadSlidingPane ID="RadSlidingPane3" Title="Global" ToolTip="Globale Gruppen"
            runat="server" Width="355px" IconUrl="/images/folder_blue.png" OnClientExpanded="LoadGlobalGroup" EnableDock="false">
            <asp:Panel ID="PanelGlobal" runat="server" Height="100%">
                <twoeyes:GlobalGroupAllocation ID="alloc_GlobalGroup" runat="server" />
            </asp:Panel>
        </telerik:RadSlidingPane>
    </telerik:RadSlidingZone>
</telerik:RadPane>

Thanks and greetings,
Ronny
Dobromir
Telerik team
 answered on 17 Feb 2011
1 answer
121 views
HI

i am using radmenu.LoadXML(StrXML) to bind data to my rad menu
StrXML=

"<Items Text=" "><Item Text="My Tracker" Url="#"><Item Text="Add My Menu" Url="Add_MyMenu.asp"/><Item Text="Manage My Menu" Url="Manage_MyMenu.asp"/><Item Text="Tracker Queue" Url="Start.asp"/><Item Text="Edit Profile" Url="edit_profile.asp"/><Item Text="Assign Accounts" Url="assign.asp"/><Item Text="Help" Url="Help.asp"/><Item Text="Report Builder" Url="ReportBuilderMain.asp"/><Item Text="DnB Admin Tool" Url="Insured_admin.asp"/></Item><Item Text="Advantage Reports" Url="AdvAcctsByBroker.asp"></Item></Items>"


this is throwing me error .."Invalid operation exception There is an error in XML document (1, 1)."

Please Help

Thanks
Harin
Kate
Telerik team
 answered on 17 Feb 2011
1 answer
30 views

 

I installed RadFormDecorator FREE for ASP.NET AJAX Q3 2010 on a Win 7 x64 machine. The installation got stuck after I received this error message
Access to the path 'C:\Program Files (x86)\Telerik\RadFormDecorator FREE for ASP.NET AJAX Q3 2010\ToolBoxInstaller_log.txt' is denied.
I had to reboot after it remained stuck overnight. Nevertheless, the product appears as though it has been installed. RadFormDecorator shows in my Start menu and the dlls are in my project Bin folder.

I am now trying to uninstall it but the un-installation is failing with the very same error:
Access to the path 'C:\Program Files (x86)\Telerik\RadFormDecorator FREE for ASP.NET AJAX Q3 2010\ToolBoxInstaller_log.txt' is denied.  The file was never written anyway.

Please help! How can I uninstall this? Is there a way to force the uninstallation?
Andrey
Telerik team
 answered on 17 Feb 2011
1 answer
241 views
Hello,

we are using the RadScheduler for quite some time in our Application. So far the data access had been done with Entity Framework 4. In the Load event we assigned an IQueryable<MyAppointment> to thr Scheduler.DataSource. This is straight forward and works just fine. Only problem is that due to any appointments of our clients, the Scheduler is very slow.
To solve that problem we want to populate our scheduler with Wcf Web Service. I don't know if I am missing something, but it doesn't seem to work. I used you many samples and here is what I did. Please tell me if something is wrong:

The implementation of the abstract class "DbSchedulerProviderBase":
I use a a static Business Class to get the Appointments and do CRUD operations. In your examples I saw that you are using direct db connections. Is my approach wrong? Also since I am not using any resources the GetResources-Method returns null.
namespace myOBIS_Entities.SchedulerProvider
{
    public class MyobisSchedulerProvider : DbSchedulerProviderBase
    {
        public override IEnumerable<Appointment> GetAppointments(ISchedulerInfo schedulerInfo)
        {
            IQueryable<myOBIS_Entities.EntityFramework.Appointment> MyoAppointments = CallingEnvironment.Membership.CurrentOrganisation.Appointments;
            List<Appointment> appointments = new List<Appointment>();
  
            foreach (myOBIS_Entities.EntityFramework.Appointment myoApp in MyoAppointments)
            {
                Appointment apt = new Appointment();
                apt.ID = myoApp.AppointmentId;
                apt.Subject = myoApp.Subject;
                apt.Start = myoApp.AppointmentStart;
                apt.End = myoApp.AppointmentEnd;
                apt.DataItem = myoApp;
                apt.ToolTip = "Appointment From WebService";
                appointments.Add(apt);
            }
  
            return appointments.AsEnumerable();
        }
  
        public override void Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
        {
            var myoSchedulerInfo = schedulerInfo as MyobisSchedulerInfo;
            AppointmentController.EditAppointment(
                Guid.Parse(appointmentToUpdate.ID.ToString()),
                myoSchedulerInfo.MaxAttendees,
                myoSchedulerInfo.Price,
                myoSchedulerInfo.LastMinutePrice,
                myoSchedulerInfo.DaysBeforeLastMinute);
        }
  
        public override IDictionary<ResourceType, IEnumerable<Resource>> GetResources(ISchedulerInfo schedulerInfo)
        {
            return null;       
          
        }
  
        public override void Insert(ISchedulerInfo schedulerInfo, Appointment appointmentToInsert)
        {
            var myoSchedulerInfo = schedulerInfo as MyobisSchedulerInfo;
  
            AppointmentController.InsertAppointment(
               myoSchedulerInfo.OrganisationId,
               myoSchedulerInfo.EventProductId,
               myoSchedulerInfo.LocationId,
               myoSchedulerInfo.Type,
               appointmentToInsert.Start,
               appointmentToInsert.End,
               myoSchedulerInfo.MaxAttendees,
               myoSchedulerInfo.CurrencyCode,
               myoSchedulerInfo.Price,
               myoSchedulerInfo.LastMinutePrice,
               myoSchedulerInfo.DaysBeforeLastMinute);
        }
  
        public override void Delete(ISchedulerInfo schedulerInfo, Appointment appointmentToDelete)
        {
            AppointmentController.DeleteAppointment(Guid.Parse(appointmentToDelete.ID.ToString()));
        }
    }
}

Next I implement the ISchedulerInfo interface by derivating form the SchedulerInfo class:
Here I need additional Info for my own Appointment objects.
namespace myOBIS_Entities.SchedulerProvider
{
    public class MyobisSchedulerInfo : SchedulerInfo 
    {
        public Guid OrganisationId { get; set; }
        public Guid EventProductId { get; set; }
        public Guid LocationId { get; set; }
        public int Type { get; set; }
        public short MaxAttendees { get; set; }
        public string CurrencyCode { get; set; }
        public double Price { get; set; }
        public double LastMinutePrice { get; set; }
        public int DaysBeforeLastMinute { get; set; }
  
        public MyobisSchedulerInfo() { }
  
        public MyobisSchedulerInfo(
            ISchedulerInfo baseInfo,
            Guid orgId,
            Guid eventProductId,
            Guid locationId,
            int type,
            short maxAttendees,
            string currencyCode,
            double price,
            double lastMinutePrice,
            int daysBeforeLastMinute) :base(baseInfo)
        {
            OrganisationId = orgId;
            EventProductId = eventProductId;
            LocationId = locationId;
            Type = type;
            MaxAttendees = maxAttendees;
            CurrencyCode = currencyCode;
            Price = price;
            LastMinutePrice = lastMinutePrice;
            DaysBeforeLastMinute = daysBeforeLastMinute;
        }
  
    }
}

For the Wcf Service class I also used one of your examples:

namespace myoWebRole.WCF
{   
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(IncludeExceptionDetailInFaults = true)]   
    public class SchedulerWcfService : ISchedulerWcfService
    {
        private WebServiceAppointmentController _controller;
         
        private WebServiceAppointmentController Controller
        {
            get
            {               
                if (_controller == null)
                {
                    _controller =
                        new WebServiceAppointmentController(new MyobisSchedulerProvider());
                }
                return _controller;
            }
        }
          
        [OperationContract]             
        public IEnumerable<AppointmentData> GetAppointments(MyobisSchedulerInfo schedulerInfo)
        {
            return Controller.GetAppointments(schedulerInfo);
        }
  
        [OperationContract]       
        public IEnumerable<AppointmentData> InsertAppointment(MyobisSchedulerInfo schedulerInfo, AppointmentData appointmentData)
        {
            return Controller.InsertAppointment(schedulerInfo, appointmentData);
        }
  
        [OperationContract]       
        public IEnumerable<AppointmentData> UpdateAppointment(MyobisSchedulerInfo schedulerInfo, AppointmentData appointmentData)
        {
            return Controller.UpdateAppointment(schedulerInfo, appointmentData);
        }
  
        [OperationContract]      
        public IEnumerable<AppointmentData> DeleteAppointment(MyobisSchedulerInfo schedulerInfo, AppointmentData appointmentData, bool deleteSeries)
        {
            return Controller.DeleteAppointment(schedulerInfo, appointmentData, deleteSeries);
        }
  
        [OperationContract]      
        public IEnumerable<ResourceData> GetResources(MyobisSchedulerInfo schedulerInfo)
        {           
            return Controller.GetResources(schedulerInfo);
        }
    }
}

in my web.config I register the Wcf Service:

<system.serviceModel>
    <behaviors>     
      <endpointBehaviors>
        <behavior name="SchedulerWcfServiceAspNetAjaxBehavior">
          <enableWebScript/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>   
    <services>
      <service name="SchedulerWcfService">
        <endpoint address="" behaviorConfiguration="SchedulerWcfServiceAspNetAjaxBehavior" contract="ISchedulerWcfService"/>
      </service>
    </services>    
</system.serviceModel>

The RadScheduler in my Scheduler.aspx site gets the following setting:
<WebServiceSettings Path="../../WCF/SchedulerWcfService.svc"  ResourcePopulationMode="ServerSide"  />

I am not using any javascript for appointmentPopulating etc.

When I run my Site with the Radscheduler I get the following Exception:

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:
  
[WebException: Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht gefunden.]
   System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) +2716592
   System.Net.WebClient.UploadString(Uri address, String method, String data) +266
   Telerik.Web.UI.SchedulerWebServiceClient.GetResources() +653
  
[Exception: An error occurred while requesting resources from the web service. Server responded with: ]
   Telerik.Web.UI.SchedulerWebServiceClient.GetResources() +1225
   Telerik.Web.UI.RadScheduler.BindResourcesFromWebService() +102
   Telerik.Web.UI.RadScheduler.PerformSelect() +117
   Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +81
   System.Web.UI.Control.EnsureChildControls() +182
   System.Web.UI.Control.PreRenderRecursiveInternal() +60
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4185


I found out that this happens due to the Property ResourcePopulationMode="ServerSide" of the WebServiceSetting.
Deleting this Property I can see the Scheduler but with an alert box saying: "The server method 'Get Resources' failed" and "The server method 'GetAPpointments' failed.

My suspicion is that either my implementation of the DbSchedulerProviderBase is wrong or my Settings in the web.config is wrong.

Any idea?

Thanks,

Peter
Telerik team
 answered on 17 Feb 2011
3 answers
296 views
Hi Team,

        When i use rad gridview, i set customer paging and auto scroll. But i always see white space in end of row and end of column. I'm refer sample code and use default theme (Office 2007).  I gave Page size is 10. Please see my attachment . Kindly, suggestion to me.

<div style="margin-right: auto; margin-left: auto; margin-top: auto; width: 780px; border:solid 1px red">
    <div style="width: 100%; height: auto;" align="left">
        <table width="480px">
            <tr style="height: 20px" align="left">
                <td align="left" width="45%">
                    <asp:Label ID="Label1" runat="server" Text="Search By"></asp:Label>
                    <asp:DropDownList ID="_cboSearchBy" runat="server" Width="150px">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:TextBox ID="_txtFind" runat="server" Width="139px"></asp:TextBox><asp:Button
                        ID="_btnSearch" runat="server" Text="Search" OnClick="_btnSearch_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div style="width: 100%;" align="left">
        <table align="center">
            <tr>
                <td>
                    <telerik:RadGrid ID="_radGrid" runat="server" AutoGenerateColumns="False" GridLines="None"
                        OnPageIndexChanged="_radGrid_PageIndexChanged" EnableEmbeddedSkins="False" Skin="mscSkinOffice"
                        AllowPaging="True" AllowCustomPaging="True" OnPageSizeChanged="_radGrid_PageSizeChanged"
                        OnDataBound="_radGrid_DataBound" Width="770px">
                        <ClientSettings>
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="2"></Scrolling>
                            <Resizing AllowColumnResize="True" />
                        </ClientSettings>
                        <SortingSettings SortedBackColor="BurlyWood" />
                        <MasterTableView DataKeyNames="Key,No">
                            <CommandItemSettings ExportToPdfText="Export to Pdf" />
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" UniqueName="SelectColumn"
                                    Resizable="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="imgbtnSelected" runat="server" Text="Select"></asp:LinkButton>
                                    </ItemTemplate>
                                    <HeaderStyle Width="50px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="Key" FilterControlAltText="Filter Key column"
                                    HeaderText="Key" SortExpression="Key" UniqueName="Key" Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="No" FilterControlAltText="Filter No column" HeaderText="No."
                                    SortExpression="No" UniqueName="No">
                                    <ItemStyle Wrap="False" />
                                    <HeaderStyle Width="80px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column"
                                    HeaderText="Name" SortExpression="Name" UniqueName="Name">
                                    <HeaderStyle Width="150px" />
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Location_Code" FilterControlAltText="Filter Location_Code column"
                                    HeaderText="Location" SortExpression="Location_Code" UniqueName="Location_Code">
                                    <HeaderStyle Width="60px" />
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address" FilterControlAltText="Filter Address column"
                                    HeaderText="Address" SortExpression="Address" UniqueName="Address">
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address_2" FilterControlAltText="Filter Address_2 column"
                                    HeaderText="Address 2" SortExpression="Address_2" UniqueName="Address_2">
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Phone_No" FilterControlAltText="Filter Phone_No column"
                                    HeaderText="Phone No." SortExpression="Phone_No" UniqueName="Phone_No">
                                    <ItemStyle Wrap="False" />
                                    <HeaderStyle Width="80px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Contact_No" FilterControlAltText="Filter Contact_No column"
                                    HeaderText="Contact No." SortExpression="Contact_No" UniqueName="Contact_No">
                                    <ItemStyle Wrap="False" />
                                    <HeaderStyle Width="80px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Contact" FilterControlAltText="Filter Contact column"
                                    HeaderText="Contact" SortExpression="Contact" UniqueName="Contact">
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Credit_Limit_LCY" DataFormatString="{0:#,0.#0}"
                                    DataType="System.Decimal" FilterControlAltText="Filter Credit_Limit_LCY column"
                                    HeaderText="Credit Limit LCY" SortExpression="Credit_Limit_LCY" UniqueName="Credit_Limit_LCY">
                                    <HeaderStyle HorizontalAlign="Right" Width="70px" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridBoundColumn>
                            </Columns>                                   
                            <ItemStyle HorizontalAlign="Left" />
                            <AlternatingItemStyle HorizontalAlign="Left" />
                        </MasterTableView>
                        <HeaderStyle Width="200px" HorizontalAlign="Left" />
                        <PagerStyle Mode="NextPrev" PagerTextFormat="{4}  Page <strong>{0}</strong> of <strong>{1}</strong>." />
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_mscSkinOffice" EnableEmbeddedSkins="False">
                        </HeaderContextMenu>
                        <FilterMenu EnableEmbeddedSkins="False" EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                </td>
            </tr>
        </table>
    </div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="_radGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="_radGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</div>

Best Regards,
Pavlina
Telerik team
 answered on 17 Feb 2011
1 answer
124 views
I have a module within DotNetNuke that contains a RadMenu and a RadDock.  Items in the menu correspond to some of the RadDocks.  For example, one of the RadDocks is named Dock_MyTasks.  I can pull that name from the RadMenuItem value field.  But when I try to use that name to $Find the Dock control I have problems.  First, DNN adds to the Dock_MyDocks name like this ...

dnn_ctr381_Que2_Dock_MyTasks.  

 

I get around that by calling a Javascript function that returns a control containing the name Dock_MyTasks.  But, when I look at the running HTML, there are multiple HTML elements that contain the name Dock_MyTasks.  They are suffixed with _T, _C, _ClientState.  Here's the JavaScript I'm trying to use.  Everyhing seems to execute just fine until I call the GetClientId function.  What am I doing wrong?

 

 

 

 

 

 

 

 

 

 

function miClicked(sender, e) {

var MenuItem = e.get_item();

var DockName = MenuItem.get_value();

var dock = GetClientId(DockName);

var isClosed = dock.get_closed();

dock.set_closed(!isClosed);

MenuItem.Selected = !MenuItem.Selected;

}

 


// Gets the ASP.NET generated control ID

 

function GetClientId(controlId) {

var count = document.forms[0].length;

var i = 0;

var aspControlId;

for (i = 0; i < count; i++) {

aspControlId = document.forms[0].elements[i].id;

pos = aspControlId.indexOf(controlId);

if (pos >= 0) break;

 

 

}
return document.forms[0].elements[i];

 

}

 

Pero
Telerik team
 answered on 17 Feb 2011
1 answer
74 views
Hi,

I am experiencing problem with RadAjaxPanel. It does complete posback when selected index changed of RadComboBox for the first time. It works fine after. What could be the problem? Here is my code. This code is in User Control.

Thank you..

<telerik:RadAjaxPanel ID="radAjaxPanel1" runat="server" LoadingPanelID="radldpnlContactInfo">
    <asp:Panel ID="Panel1" runat="server" Visible="False">
        <table id="Table1"><tr><td>
                                <telerik:RadComboBox ID="RadComboBox1" runat="server"
                                    AutoPostBack="true" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">
                                </telerik:RadComboBox>
                            </td>

                            <td valign="top">
                                <br />
                                <asp:Button ID="button1" runat="server" OnClick="button1_Click" Text="Test1"
                                    /><br />
                                <asp:Button ID="button2" runat="server" OnClick="button2_Click" Text="Test2"
                                     />
                            </td>
                        </tr>
                    </table>
</asp:Panel>
</telerik:RadAjaxPanel>

Maria Ilieva
Telerik team
 answered on 17 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?