Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
353 views

I am using telerik RadGrid inside a user control. When I use the user control inside a normal ASP.NET page, I am able to see the full functionality of the telerik radGrid such as colors, header column click and so on.

 

When I move the code to a web part and deploy on the SharePoint site, I lose all the functionality and formatting. It appears to me that it is not reading any CSS or JavaScript at all.

I have deployed Telerik.Web.UI dll to the GAC. It's version #  2009.3.1103.20
What am I doing wrong?

 

Please help!

Entry at the top of my control.acsx file.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyControl1.ascx.cs" Inherits="_controls_MyControl" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

   

<telerik:RadGrid ID="uiSignInGrid" runat="server" AutoGenerateColumns="False" GridLines="None">


 

In my master page for the SharePoint site, I have added links to all desired files.

<link href="/_layouts/global/css/global.css" rel="stylesheet" type="text/css" />

<link href="/_layouts/global/radcontrols/Dock/Dock.MyApp.css" rel="stylesheet" type="text/css" />

<link href="/_layouts/global/radcontrols/Grid/Grid.MyApp.css" rel="stylesheet" type="text/css" />

<link href="/_layouts/global/radcontrols/TabStrip/TabStrip.MyApp.css" rel="stylesheet" type="text/css" />

<link href="/_layouts/global/radcontrols/TabStrip/TabStrip.ViewEdit.css" rel="stylesheet" type="text/css" />

<link href="/_layouts/global/radcontrols/ToolTip/ToolTip.MyApp.css" rel="stylesheet" type="text/css" />

<link href="/_layouts/global/radcontrols/ToolTip/ToolTip.MyApp_RollOver.css" rel="stylesheet" type="text/css" />

 

My web.config for the SharePoint site, contains following entries in their respective places.


Added following entries to <configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
  
  
  
Added following entry to <SafeControls>
<SafeControl Assembly="Telerik.Web.UI, Version=2009.3.1103.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" />
  
  
Following entry from httphandler
  
  <httpHandlers>
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
      <remove verb="GET,HEAD,POST" path="*" />
      <add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      <add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.3.1103.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"   validate="false"/>
  
        
    </httpHandlers>
  
Added an entry in the httpModules
  
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  
Following is the handler entry
  
<handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  
Added a system.webserver section.
  
<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <remove name="ScriptModule" />
      <add name="ScriptModule" preCondition="managedHandler"
         type="System.Web.Handlers.ScriptModule,
           System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
           PublicKeyToken=31BF3856AD364E35"/>
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated"/>
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx"
         preCondition="integratedMode"
         type="System.Web.Script.Services.ScriptHandlerFactory,
           System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
           PublicKeyToken=31BF3856AD364E35"/>
      <add name="ScriptHandlerFactoryAppServices" verb="*"
         path="*_AppService.axd"
         preCondition="integratedMode"
         type="System.Web.Script.Services.ScriptHandlerFactory,
           System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
           PublicKeyToken=31BF3856AD364E35"/>
      <add name="ScriptResource" preCondition="integratedMode"
         verb="GET,HEAD" path="ScriptResource.axd"
         type="System.Web.Handlers.ScriptResourceHandler,
           System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
           PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  </system.webServer>

 

Tsvetoslav
Telerik team
 answered on 28 Oct 2010
2 answers
117 views
We have implemented multiple RadComboBox controls in our solution that load items on-demand from web services.  We have marked all of them with EnableVirtualScrolling=true.  Everything is working in terms of the batch load of items when scrolling, however we are noticing strange scrolling behavior when reaching the end of the list of items.  When the vertical scrollbar reaches the last item (all items have been loaded), it jumps back up as if there is more area to scroll.  Thus, it is impossible to scroll to the bottom of the drop-down area.  We have tried setting both Height and MaxHeight properties, but the behavior is the same.  I noticed in the online demos for loadondemand virtual scrolling that the drop-downs indeed scroll to the bottom without issue. 

For some structural context, our combo box controls exist on a nested usercontrol form that is contained within a RadSplitter pane.  There is no custom CSS applied to the comobo boxes themselves.  Here is sample markup for one of our comboboxes:

<telerik:RadComboBox ID="SourceCombo" runat="server"         
      DropDownWidth="175px"           
      EmptyMessage="Select a source"           
      EnableLoadOnDemand="true"
      EnableVirtualScrolling="true"                     
      MaxHeight="200px"           
      OnClientSelectedIndexChanged="ClearSourceFilteredItems"
      ShowMoreResultsBox="true"          
      Width="175px">
 <WebServiceSettings Path="~/ES/LookupMethods.aspx" Method="GetSources" />
</telerik:RadComboBox>

Any suggestions on what we might be doing wrong?

FYI - we are using the latest SP build of the telerik controls, .NET 4.0, VS2010.

Austin
Austin Jones
Top achievements
Rank 1
 answered on 28 Oct 2010
1 answer
159 views
I am trying to use a Telerk RadGrid (RadGrid.Net2, I know its old, its targeted for .NET 2.0, it should still work regarless) control inside a Sandboxed Visual WebPart. In the load
Telerik.WebControls.RadGrid()
I am getting an unable to initialize exception, IO exception in the load 
{"Request for the permission of type 
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."} <BR>

The sandboxed solutions are also restricted by an out of the box CAS policy, which is very minimal permissions, disk access is NOT one of them. We dont want to change the code access policies, it is NOT possible to put the elevate the trust in web.config to medium/full.
Here are my questions:
Which folder is the RADGrid trying to access here?
Does any of the latest RADGrid controls work in SharePoint with minimal trust?
Tsvetoslav
Telerik team
 answered on 28 Oct 2010
1 answer
133 views
Hi..

As usual once again am struck..

previously i had asked for the navigation buttons in the multi month view calender.. for that you all had given the solution mentioned in below link..

http://www.telerik.com/community/code-library/aspnet-ajax/calendar/how-to-use-raddatepicker-with-multimonthview-calendar.aspx

now i want this type of calendar in rad grid for filter column.. some think like show below.. pls help me with a sample if possible

also i want the funnel image..

  <telerik:GridDateTimeColumn DataField="DocLibItem" UniqueName="DocLibItem" DataFormatString="{0:MM/dd/yyyy hh:mm tt}" HeaderText="Last Updated" >
                        <HeaderStyle Width="170px" />
                        <ItemStyle CssClass="doclibview_item_text" Width="170px" />

  <FilterTemplate >
              
             <telerik:RadDateTimePicker
                            ID="DateTimePicker" runat="server"
                            Skin="Windows7"  
                            Calendar-Visible="false" EnableViewState="true" >
                        </telerik:RadDateTimePicker>


  <telerik:RadCalendar
                            ID="RadCalendar1" runat="server"  DayStyle-Font-Bold="true"
                            CalendarTableStyle-BackColor="AliceBlue"
                            ShowOtherMonthsDays="false" ShowRowHeaders="false"
                            EnableMultiSelect="false" AutoPostBack="true"
                            MultiViewColumns="3" MultiViewRows="1"
                            ClientEvents-OnDateSelected="DateSelected" >
                              <SpecialDays>
                                <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="Bisque" />
                              </SpecialDays>
                     </telerik:RadCalendar>

                        </FilterTemplate>

                    </telerik:GridDateTimeColumn>
Marin
Telerik team
 answered on 28 Oct 2010
5 answers
209 views
I'm trying to show a custom window when the user single-clicks an appointment. I put an AdvancedEditTemplate in but it appears below my scheduler (with advancedform-modal set to true) and I would like it to appear in the center of the scheduler. Is this possible? Also how can I show it on single-click rather than double?
Veronica
Telerik team
 answered on 28 Oct 2010
3 answers
78 views
I'm comparing Grid controls and need to know if the Telerik Grid control will permit me to modify the Virtual Scrolling sample:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/virtualscrollpaging/defaultcs.aspx

and perform the following actions using Javascript:
1) Scroll to a particular row
2) Highlight that row
3) Detect if a user changed the selection
4) Respond (via Javascript) if the selection was changed

Let me know if this is possible using AJAX or through web services.  I'm looking for the most perfomant option.
Pavlina
Telerik team
 answered on 28 Oct 2010
3 answers
218 views
Hello,

I am building a page similar to the following:
http://demos.telerik.com/aspnet-ajax/listbox/examples/applicationscenarios/insertitem/defaultcs.aspx

One of the requirements is that as part of the validation, I have to check that at least one item is present inside the RadListBox.  I tried using the RequiredFieldValidator but that enforces the validation that the item in the listbox should be selected.

In my case, I just want to check that the listbox has at least one item.  (I don't want my users to select one item for this validation to succeed).  How can I accomplish this that the validation succeeds if the listbox has one item which may or may not be selected?

Thanks,
Pratik
Genady Sergeev
Telerik team
 answered on 28 Oct 2010
1 answer
64 views
I am working with the editor control and I am providing a few buttons that will allow the user to insert some pre-defined HTML content. This is easy enough to do using the pasteHtml method but it isn't pasting all of the HTML text I'm passing into it. There are some comments I've added to these snippets so that I can tell if the code was auto-inserted in case there are issues in the future and troubleshooting needs to be done on the pages the editor is generating. I have noticed that if I am in HTML view that the comment is pasted as expected but not when I am in Design view. The people who use this tool know little/nothing about editing raw HTML so I cannot count on them to use the HTML view to insert comments (in fact we are considering disabling editing in HTML view per the KB article).

For example, we have lists that contains a fairly standard sets of bullet points that the users would like to just click a button to insert into a document. I would like to insert something like this:

<!-- Below UL Auto Inserted -->
<UL>
<LI>Item 1</LI>
<LI>Item 2</LI>
<LI>Item 3</LI>
</UL>
<!-- Above UL Auto Inserted -->

It will get pasted into the editor widow with the following HTML
<p>&nbsp;</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<p style="text-align: left;" class="style20"><!-- Above UL Auto Inserted --></p>

As you can see, the second comment is included in the pasted HTML but the opening comment is not. Additionally, the editor has inserted a <p> around the second comment and has inherited the styles of the paragraph where the cursor was located when the paste opperation was completed. Is there a workaround for this so that the opening comment will be pasted into the window and a way to prevent the paragraph from being placed around the second one?
Dobromir
Telerik team
 answered on 28 Oct 2010
2 answers
226 views
Need some help here. The radgrid skin images for the button controls are not showing when I build the site in VS -- the filter button and pager buttons. They show in the designer, split screen and design mode. I've checked everything I know to check. All the background images for the skin show, though. Not sure what to do next, any suggestions? I'm using

2010.1.519.35

 Thanks. Celeste
Celeste
Top achievements
Rank 1
 answered on 28 Oct 2010
1 answer
97 views
I'm using reportviewer in my asp.net application and everything is working fine
except when the report initially renders it take 3 about seconds ( which is fine )
but it shows a blank report, not the loading image. If you look at the browser
it shows that it's loading however, I'm fearful my users will not notice this and
re-click the generate report button. I'm also using radajaxmanager to try to force
the loading panel to display but to no avail. So my question is: Is there a way to
capture the render complete ( in asp.net ) so I may show a message stating the
report is rendering until it completes then I can hide the message.

Thanks
Peter
Telerik team
 answered on 28 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?