Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.4K+ views
Hi
       I upgraded .net 3.5 from .net 1.1 version, after that i installed Telerik control 2009.1.527.20 for my new project.Then  I added 

<%

@ Register Assembly="Telerik.Web.UI, Version=2009.1.527.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"  

 

Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 to my new form to work out telerik control. But i am facing the follwing issues
1) I cannot drag and drop the telerik control from tool box
2) suppose i  manually add control by code by griving tagprefix name like                                                                        <telerik:RadGrid ID="Grid1" runat="server"></telerik:RadGrid>
After i try to run the project i am getting the following error eventually. I dont know what is the reason

"The type or namespace name 'Telerik' could not be found in the global namespace (are you missing an assembly reference?) "

I tried 'gacutil' command tool to register the dll and also added the following block of code in web,config 

 

<

assemblies>

 

<

 

add assembly="Telerik.Web.UI, Version=2009.1.527.20, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>

 

 

 

But no use...the error still comes...What step i need to be taken to avoid the foloowing issues.

-Thanks


 

 

 




 

 

 

 

John John
Top achievements
Rank 1
 answered on 11 Nov 2009
6 answers
271 views
Hello,

After much expermentation and searching through the forums,  I have figured out how to show a RadScheduler appointment with a RadDock.  This is triggered by the OnClientAppointmentClick.  I opted to use the clientside because the server side requires the Scheduler to be editable.  I only want folks in certain roles to have this ability.  The final goal is that when the general public clicks on an appointment, the details are loaded.  I prefer this over the common use of ToolTip.  I suppose I could have created two templates, one for viewing and one for editing, loading the appropriate one depending on the the user role.  I will probably use that, but is not the initial avenue I took.  I went down the path of client side and have succesfully implemented this using RadDock.   The one thing I did not like was that RadDock can not be modal without much tweaking.   Looking at what was involved to add this behaviour, I decided to use the RadWindow.  This decession has lead me here, as I have reached a stumbling block.   I am currently attempting to use the RadWindow as I did the RadDock by loading content dynamically by changing the DOM using innerHTML.   This was easy with RadDock, but not so with RadWindow.   I have played with multiple variations and have at least prevented the nasty object is null by first showing the window and then accessing the DOM.  That actually makes sense for first time load.  So now my script does not cause errors, but the content does not display?  I have attatched all the code so that people can see a working example of how to do this with RadDock.  I have only ommitted the SQLDataSource.   Please take a look at onAppointmentClick javascript function.  No errors but content is not loaded.   Perhaps this approach is not possible.   I know that it can easily be overcome by loading a seperate control in the window.  Overall that may be better, but I still want to see this work.  (PS.   The OnAppointmentClickDock function works.  For those who want to play simply change the event in the scheduler).

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="zzz.ascx.cs" Inherits="xxx.Modules.yyy.zzz" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
        <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">  
          
           <script type="text/javascript">   
           //<![CDATA[     
                
                function formatWeekName(rawDate)
                {
                   var dayofWeek = '';
                   switch (rawDate.getDay()) {
                      case 0:
                         dayofWeek = 'Sunday';
                         break;
                      case 1:
                         dayofWeek = 'Monday';
                         break;
                      case 2:
                         dayofWeek = 'Tuesday';
                         break;
                      case 3:
                         dayofWeek = 'Wednesday';
                         break;
                      case 4:
                         dayofWeek = 'Thursday';
                         break;
                      case 5:
                         dayofWeek = 'Friday';
                         break;
                      case 6:
                         dayofWeek = 'Saturday';
                         break;
                      default:
                         dayofWeek = '';
                   }
                   return dayofWeek;
                }
                
                function formatMonthName(rawDate) 
                {
                   var monthName = '';
                   switch (rawDate.getMonth()) {
                      case 0:
                         monthName = 'January';
                         break;
                      case 1:
                         monthName = 'February';
                         break;
                      case 2:
                         monthName = 'March';
                         break;
                      case 3:
                         monthName = 'April';
                         break;
                      case 4:
                         monthName = 'May';
                         break;
                      case 5:
                         monthName = 'June';
                         break;
                      case 6:
                         monthName = 'July';
                         break;
                      case 7:
                         monthName = 'August';
                         break;
                      case 8:
                         monthName = 'September';
                         break;
                      case 9:
                         monthName = 'October';
                         break;
                      case 10:
                         monthName = 'November';
                         break;
                      case 11:
                         monthName = 'December';
                         break;
                      default:
                         monthName = '';
                   }
                   
                   monthName = monthName + ' ' + rawDate.getDate();
                   return monthName;
                }
                function formatTime(rawDate)
                {
                   var hours = rawDate.getHours();
                   var minutes = rawDate.getMinutes();
                   var ampm;
                   
                   if (hours >= 12) {
                      hours -= 10;
                      ampm = " PM";
                   }
                   else {
                      ampm = " AM";
                   }
                   
                   if (minutes < 10) {
                      minutes = "0" +  minutes;
                   }
                   
                   return hours + ":" + minutes + ampm;
                }
                
                function onAppointmentClick(sender,eventArgs)
                {
                   var appointment = eventArgs.get_appointment()
                   var subject = appointment.get_subject();
                   var rawEndDate = appointment.get_end();
                   var rawStartDate = appointment.get_start();
                   
                   var endDateTime = formatWeekName(rawEndDate) + ", " + formatMonthName(rawEndDate) + " at " + formatTime(rawEndDate);
                   var startDateTime = formatWeekName(rawStartDate) + ", " + formatMonthName(rawStartDate)  + " at " + formatTime(rawStartDate);
                   
                   var fbtWin = $find("<%= RadWindow1.ClientID %>");
                   fbtWin.show();
                   fbtWin.get_contentFrame().contentWindow.innerHTML = "HELLO WORLD";
                   fbtWin.hide();
                   fbtWin.show();
                  
                }
                function onAppointmentClickDock(sender,eventArgs)
                {
                   var appointment = eventArgs.get_appointment()
                   var subject = appointment.get_subject();
                   var rawEndDate = appointment.get_end();
                   var rawStartDate = appointment.get_start();
                   
                   var endDateTime = formatWeekName(rawEndDate) + ", " + formatMonthName(rawEndDate) + " at " + formatTime(rawEndDate);
                   var startDateTime = formatWeekName(rawStartDate) + ", " + formatMonthName(rawStartDate)  + " at " + formatTime(rawStartDate);
                   
                   var dock = $find("<%= RadDock1.ClientID %>");
                   var viewPort = $telerik.getViewPortSize();
                   var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);
                   var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);                
                   $telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });
                   
                   var content = dock.get_contentContainer();
                   content.innerHTML = "<table width='100%' border='0'><tr><td style=' font-weight:bolder'>Start:</td><td>" + startDateTime + "</td></tr><tr><td style=' font-weight:bolder'>End:</td><td>" + endDateTime + "</td></tr><tr><td style=' font-weight:bolder'>Description:</td><td>" + subject + "</td></tr></table>";   
                   dock.set_closed(false);
                }
 
 
            //]]> 
            </script> 
      </telerik:RadScriptBlock>    
        
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadScheduler1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
                <telerik:AjaxUpdatedControl ControlID="RadDock1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
   
 
</telerik:RadAjaxManagerProxy>      
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
    Width="75px" Skin="WebBlue" Transparency="20">  
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
        style="border: 0px;" /> 
</telerik:RadAjaxLoadingPanel> 
    
<telerik:RadScheduler ID="RadScheduler1" runat="server" Height="460px"  OnClientAppointmentClick="onAppointmentClick" EnableEmbeddedScripts="True" 
    HoursPanelTimeFormat="htt" Skin="Outlook" ValidationGroup="ctl00_RadScheduler1" 
    DataSourceID="SqlDataSource1"   
    DataEndField="End"   
    DataKeyField="ID" 
    DataRecurrenceField="RecurrenceRule"   
    DataRecurrenceParentKeyField="RecurrenceParentID" 
    DataStartField="Start"   
    DataSubjectField="Subject" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound">  
</telerik:RadScheduler> 
 
<telerik:RadDock ID="RadDock1" runat="server" DockMode="Floating" Closed="true" Skin="Outlook"  Width="500px" Height="300px">  
<ContentTemplate> 
   
</ContentTemplate> 
</telerik:RadDock> 
<telerik:RadWindow ID="RadWindow1" runat="server" AutoSize="True" Modal="True" Skin="Vista" > 
</telerik:RadWindow> 
 
Svetlina Anati
Telerik team
 answered on 11 Nov 2009
4 answers
181 views
Hi,

I'm looking for two things,
1.  To change the font to century gothic.  Which actually fonts work?
2.  To change the font family for the whole chart in one place.

Any help would be great.
Ves
Telerik team
 answered on 11 Nov 2009
5 answers
107 views

Hi,

Using RadControls for ASP.NET AJAX version 2007.3 1425 (Feb 25, 2008) and Internet Explorer 7 (version 7.0.5730.13), I am trying to paste a flash element in the RadEditor with the following clientside script:
    var ieFilter = editor._filtersManager.getFilterByName("IEKeepObjectParamsFilter");
    var ffFilter = editor._filtersManager.getFilterByName("MozillaKeepFlashString");
    if (ieFilter) strXhtml = ieFilter.getDesignContent(strXhtml);
    if (ffFilter) strXhtml = ffFilter.getDesignContent(strXhtml);
    editor.pasteHtml(strXhtml);

Before this code is executed, the strXhtml variable contains the following xhtml:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" title=""  width="100"  height="100"  xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash"><param name="movie" value="&#47;MediaFile.axd&#63;Id&#61;165&#38;t&#61;091027133557"></param><param name="quality" value="high"></param><param name="bgcolor" value="#FFFFFF"></param><embed src="&#47;MediaFile.axd&#63;Id&#61;165&#38;t&#61;091027133557" quality="high" bgcolor="#FFFFFF" title=""  width="100"  height="100"  xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></object>

The string that is passed to the pasteHtml method contains the following:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" title=""  width="100"  height="100"  xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash"><rade_param name="movie" value="&#47;MediaFile.axd&#63;Id&#61;165&#38;t&#61;091027133557"></rade_param><param name="movie" value="&#47;MediaFile.axd&#63;Id&#61;165&#38;t&#61;091027133557"></param><rade_param name="quality" value="high"></rade_param><param name="quality" value="high"></param><rade_param name="bgcolor" value="#FFFFFF"></rade_param><param name="bgcolor" value="#FFFFFF"></param><embed src="&#47;MediaFile.axd&#63;Id&#61;165&#38;t&#61;091027133557" quality="high" bgcolor="#FFFFFF" title=""  width="100"  height="100"  xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></object>

After this html is pasted I switch to html mode where I see the following:
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="100" width="100" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" xlink:title="Testflash" xlink:href="8-165-o" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" href="null">
<param name="movie" value="&#47;MediaFile.axd&#63;Id&#61;165&#38;t&#61;091027133557">
<param name="quality" value="high">
<param name="bgcolor" value="#FFFFFF"><embed src="&#47;MediaFile.axd&#63;Id&#61;165&#38;t&#61;091027133557" quality="high" bgcolor="#FFFFFF" title=""  width="100"  height="100"  xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="8-165-o" xlink:title="Testflash" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed></object>

When I postback the page and access the RadEditor's Content property this contains the same (except that the order of some attributes is different).

I see several differences between the content I originally pasted and the content that is posted:
- the title="" attribute has been removed from the <object> element (not a big problem).
- a href="null" attribute has been added to the <object> element (not a big problem though I doubt that this is comform the xhtml specification).
- the <param> tags are no longer closed. This is a problem since the content is not valid xhtml anymore, and I cannot parse it with an xml parser (which I need to do).

How can I solve this issue? Thanks for any help!

Rumen
Telerik team
 answered on 11 Nov 2009
1 answer
130 views
Hello,

I have page which contains only a radgrid. This page is displayed through the following radwindow.
 <telerik:RadWindow ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" 
                                NavigateUrl="../Client/ForecastsSelect.aspx" runat="server" ID="wndForecastSelect" Modal="true" 
                                AutoSize="true" Animation="FlyIn" OnClientClose="OnForecastClose" Behaviors="Close"
                            </telerik:RadWindow> 

The grid in the popup page:
        <telerik:RadGrid runat="server" DataSourceID="SqlDataSource1" GridLines="None"  
            ShowGroupPanel="True" AllowPaging="True"
<MasterTableView datasourceid="SqlDataSource1"
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
</MasterTableView> 
            <clientsettings allowdragtogroup="True"
            </clientsettings> 
        </telerik:RadGrid> 


If I set ShowGroupPanel to false on the grid, the window is well resized. But if the ShowGroupPanel is set to true, there is an extra blank area at the bottom of the window. You can see it in attachments.

Do you have a fix for that?

best regards,

Laurent


Svetlina Anati
Telerik team
 answered on 11 Nov 2009
2 answers
130 views
I have looked into this old post:

http://www.telerik.com/community/forums/aspnet-ajax/input/radinputmanager-and-radtextbox.aspx

I would also like to extend functionality to show tooltips for validation errors. However, if I use RadInputManager, I could only show this behaviour using regular MS Textbox controls. From the example on the code on the Telerik blog, I replaced a textbox with a raddateinput and changed the javascript on the onClientDateTxtError event from

                var eleId = args.get_targetInput().get_id();
                var ele = $get(eleId);

to

                var ele = $get('<%=RadDateInput1.ClientID%>' + '_text');

Noticed that tooltip doesn't show or validation is not firing..

Also, being this is an old post, is there something on the current build to allow RadInputManager to work for the RadInput controls (radtextbox, raddateinput, raddatepicker, radmaskedtextbox, radnumerictextbox, etc.)?

            <telerik:DateInputSetting BehaviorID="DateInputSetting1" ErrorMessage="Invalid Date" EmptyMessage="Enter Date in   MM/DD/YYYY" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" Validation-IsRequired="true" Validation-ValidateOnEvent="All">
                <ClientEvents OnError="onClientDateTxtError" OnKeyPress="onClientTextChanged" />
                <TargetControls>
                    <telerik:TargetInput ControlID="RadDateInput1" />
                </TargetControls>
            </telerik:DateInputSetting>


Or is it one thing or the other? Meaning, RadInputManager + ASP.NET textbox   OR   RadInputControls + ASP.NET validation controls

Sample codes would be appreciated. Thanks!



Martin
Telerik team
 answered on 11 Nov 2009
2 answers
99 views
Hello

I like to use the ToolProviderID in my Editor. Is this option already integrated in the MOSS-Editor, if yes, in which Version. If no, is a released planned to provide this feature, and when is this release scheduled.

TIA

regards
patrick
Stanimir
Telerik team
 answered on 11 Nov 2009
1 answer
229 views

Hi,

I would like to set the time interval in scheduler time slot,how can I achieve this?

Thanks

Sabarish

Shinu
Top achievements
Rank 2
 answered on 11 Nov 2009
2 answers
100 views
Do standard AJAX control extenders work with the ASP.NET AJAX controls? Specifically the RadGrid? I have made an extender, and it all compiles fine, but nothing ever gets called on the client in my extender code. I can confirm the javascript is being referenced in the page, and I have made extenders that work fine with other non-Telerik controls.

Am I wasting my time here, or is there some magic thing I need to do to get it working?

Tsvetoslav
Telerik team
 answered on 11 Nov 2009
1 answer
88 views

I want to click on child node and it show a RadWindow. But sometime i click on node and it show , and sometime not. I dont know what reason? Please Help me to solve this problem.Thanks. This is my code, i has tried to put this code into RadTreeView1_NodeDataBound.. but i cannot

 

protected

 

void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)

 

{

    e.Node.Attributes[

"onclick"] = String.Format("return ShowChannel('{0}');", e.Node.Value);

 

}

Shinu
Top achievements
Rank 2
 answered on 11 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?