Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
4.9K+ views

This topic is a constant source of confusion for me. Often referenced web pages sometimes seem out of date or conflicting. It's not clear whether the information is accurate for a specific release or for all time. I was going to blog this but maybe it's better if we can create a single forum thread here to become the definitive statement for the web.config definition of Telerik.Web.UI.WebResource.axd.

Here's one excellent reference on the topic:
http://www.telerik.com/help/aspnet-ajax/radscriptmanager.html
Really I think this information applies to most or all controls, but if you're aware of any exceptions for Telerik controls, please post a response here.

For IIS6, consider the following <httpHandler> lines:

<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/> 

and

<add path="Telerik.Web.UI.WebResource.axd"
     
type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
  
  verb="*"
     validate="false" />

When Telerik.web.ui is set to Copy Local (not GAC), is it better to not specify the PublicKeyToken?
Is it OK if we do when the DLL isn't in the GAC?  I think so.
Does the PublicKeyToken ever change?  I don't think so.

For IIS7, consider the following <system.webServer><handlers> lines:

<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd"
     type="Telerik.Web.UI.WebResource"
   
 verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>

and

<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd"
     type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
     verb="*" preCondition="integratedMode"/> 

I don't think the answer to the above questions is different for IIS, but if they are, please let us know.

Given the above, if you're not using the GAC, you should probably never have to change these web.config entries for a given site after they are initially set. See below if you're using the GAC.

Regarding that preCondition runtimeVersion2.0 spec, I'm thinking it doesn't need to be there. The documentation for that attribute says: "Specify the runtimeVersionv2.0 value when the handler should respond only to requests in application pools that are configured to use .NET Framework version 2.0.". I think this is a hold-over from when people were transitioning from v1.1 to 2.0. These days all application pools should be configured for .NET2.  The question becomes: what happens with .NET 3.x or .NET 4? Is it better to add that attribute parameter for the future, or to leave it out for the future?

The help page referenced above provides this sample for IIS7 when Telerik.web.ui.dll is in the GAC:

<add name="Telerik.Web.UI.WebResource"
    
path="Telerik.Web.UI.WebResource.axd" verb="*"
    
type="Telerik.Web.UI.WebResource, Telerik.Web.UI, 
           Version=[ASSEMBLY_VERSION], Culture=neutral, PublicKeyToken=121fae78165ba3d4"
 />

For anyone not familiar with the syntax, the question might arise:
- Should the name attribute have underscores or periods?
I don't know. See this page for an example where underscores are used:
http://dotnetnotes.i-do-it.com/2009/05/17/CouldNotLoadFileOrAssemblyTelerikWebUI.aspx
I've seen that syntax elsewhere but I'm not sure if it's for web page formatting or if it's valid web.config formatting.

Note that for GAC references the assembly version is required, since the GAC can contain multiple assemblies for the same component but different versions.  The ASSEMBLY_VERSION must be the full version ID for your RadControls release.  For example:
Version=2009.3.1103.35
or
Version=2009.3.1314.35
In this case the PublicKeyToken is required.  More information on the topic is available here:
http://www.telerik.com/help/aspnet-ajax/web-resources-troubleshooting.html

What that means is that if you use the GAC to avoid having multiple copies of DLLs laying around, or to avoid having one application with DLLs for with 2009Q1 and another with 2009Q3, then you need to change web.config to use a specific version of RadControls whenever you upgrade your environment - that is, if you want a specific application to use the new version.

Why did I write this?  I was recently chasing down errors where FireBug is reporting 401 Unauthorized errors for WebResource.axd and Teleric.Web.UI.WebResource.axd. Fiddler2 reports no such errors.  Confused about this I started looking closely at my web.config and settings in my IIS6. I still haven't resolved those issues but I think I have a better understanding of what should be in web.config, so I thought I'd post a discussion on the topic here.  I hope this helps someone.

For anyone doing a search on this topic in the future, please correct any mis-information and provide links to solid resources on the topic. Again, it's important to ensure that someone can tell whether the information they see is only good for the current release, or if it applies to all releases.

Empire
Top achievements
Rank 1
 answered on 11 Feb 2020
1 answer
158 views

Hopefully this question has a simple answer.  I'm using a RadGrid with 1 hard coded column, and several autogenerated columns.  The grid is mapped to a file uploaded by the user that has unknown columns.  In the header for each dynamic column, i'm inserting a RadComboBox that allows the user to map the column from a predefined list of valid column names.  I add these RadComboBoxes in the ItemCommand event handler.  This works without issue.  When the user is finished making their selections in each of the RadComboBoxes, i need to capture the values from each of the RadComboBoxes and i do this using a custom item command. This is also working well with one caveat.  It only works great if the button that fires the ItmCommand is in the RadGrid header.  This is not ideal just from a display point of view.  i'd prefer to have the button below the grid.  I read through the docs and saw that i can fire a command event via javascript using the masterTable.fireCommand("CustomCommandName");  This works except that i need to be able to pass in a context that tells the server-side event handler that i need access to the header row.  When i use the button in the header and i step through my server-side ItemCommand code i can see that e.Item is of type GridHeaderItem which is perfect, this allows me to access the e.Item.Cells[x].Controls collection to find the RadComboxBox and extract the value that was selected by the user.  When i step through the same server-side ItemCommand code using the button located outside the grid (called via)  masterTable.FireCommand(), e.Item is of type GridDataItem instead of GridHeaderItem and so i'm not able to access the header row controls to find the RadComboBoxes and extract their values.   I can see that fireCommand accepts a commandargument parameter after the command name, but so far i'm not able to figure out what value should be sent to indicate that the command should be fired in the context of the header row and not an item row.  I've tried several different numeric values including -1, 0 and numbers > 0.  In each instance when the event fires e.Item is of type GridDataItem, which is no good.

The one work around that does seem to work, but is a little bit of a hack is to copy the actual javascript code of the button in the header, and then create a button outside the grid that mimics that.  This works, but i end up with something hard coded that looks like this:

<a id="ctl00_MainContent_rgMapFields_ctl00_ctl02_ctl00_lbtnImport1" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$rgMapFields$ctl00$ctl02$ctl00$lbtnImport&quot;, &quot;&quot;, true, &quot;MapFields&quot;, &quot;&quot;, false, true))">Import</a>

This works but it doesn't leave me with a good feeling to rely on this too heavily.  It seems like there should be a simple answer as to what command argument i pass into the fireCommand Javascript method to indicate a command argument for the header.

 

Current javascript method is really basic and looks like this:

        function Import(sender) {
            var masterTable = $find("<%= rgMapFields.ClientID %>").get_masterTableView();
            masterTable.fireCommand("ValidateMapping", "");  // <-- something needs to go here other than ""
        }

I can provide code for the radgrid or any of the event handlers if needed, but i don't know that it's super relevant.  it is all working the way i want with the exception of just taking a button that fires an item command from the header and placing it below the grid.  

Thanks!

-Mark

 

Eyup
Telerik team
 answered on 11 Feb 2020
1 answer
154 views

Hi Telerik,

 

On the RadScheduler when dragging an appointment to the all day slot the functionality does not work consistently, I have recreated this on your demo here: https://demos.telerik.com/aspnet-ajax/scheduler/examples/overview/defaultcs.aspx

 

Please see this video for an example of the issue: https://www.dropbox.com/s/te7eol3sls2w56l/RadScheduler%20Problem.mp4?dl=0. Between 0-3 seconds the functionality works correctly and the event goes into the all day section although it does not look correct. Between 3 seconds and 10 seconds it does not go into the all day section at all. At 11 seconds it works perfectly for the first time, and from 13 seconds onwards it once again fails to go into the all day section.

Peter Milchev
Telerik team
 answered on 11 Feb 2020
1 answer
238 views

 When multiple items are selected the textbox attempts to display all selections and after a certain length it instead displays how many items are selected. Currently there seems to be only two options for this display:

1/ Seeing the actual selections until the length of the containing box is met, then it will display the number of items checked (this is default)
2/ Same as above only it will not show the number of selections even if the length of the containing box is exceeded. 

I'm looking for what I think is the obvious third choice to have ONLY the number of items selected shown. Does anyone know of a way to achieve this?

Thanks!

Rob
Top achievements
Rank 1
Veteran
Iron
 answered on 10 Feb 2020
0 answers
97 views

Hello Forum,

I'm facing a weird issue with the RadGrid when I changed the default theme to some other theme. The Grid loading animation is shown for each and every column of the Grid when it is loaded or refreshed. Please check the attached screenshot of the same. Could someone help what am I doing wrong ? The control version is 2018.3.1017.

yenkay
Top achievements
Rank 2
 asked on 10 Feb 2020
1 answer
207 views

Hello,

 

We have two grids which are parent and child. So one selection of the row in the parent grid gets the corresponding rows for the child grid. 

So having the inline editing enabled using the click of double click doesn't seem to work since the autopostback will turn off the inline editing.

So the solution that we came up for this issue is to have a button in the row of each record that triggers inline editing. 

Is that possible?

 

We also have implemented a page level save or cancel buttons so is it possible to remove the Save, delete cancel changes buttons on the grid?

Attila Antal
Telerik team
 answered on 07 Feb 2020
1 answer
95 views

 Dear Community,

I am currently facing an issue where the RadGrid export fails with an Sys.WebForms.PageRequestManagerParserErrorException (Client-Side) when trying to export a filtered grid. I am using the custom DocumentProcessing described in: https://www.telerik.com/support/kb/aspnet-ajax/details/export-large-amount-of-data-to-pdf-xlsx-and-csv-using-the-telerik-document-processing-libraries

However, the data that is generated is fine. Also, it works when doing custom search through another Textfield / Button. The issue only occurs after previously filtering the grid. It seems like the source for the http request is false and the browser is not expecting a document to be returned. Instead of "document" as http request source it says "xhr". (see attachments: first one shows the error, the other the working request) When opening the request in another tab it works fine as well.

Could anyone help figure this out?


Attila Antal
Telerik team
 answered on 07 Feb 2020
4 answers
407 views
I get this error System.OutOfMemoryException when i export radgrid data to excel even if record count to 6000 only.
Please provide me some solution.

Gabriel
Top achievements
Rank 1
 answered on 06 Feb 2020
23 answers
1.8K+ views
I've been experimenting with the Excel export function to see if we can use it to support some of our client's requirements. So far it's very impressive, handling obscure character sets and bullet points and so forth very nicely indeed.
The only problem I have with it is when exporting a multi-line cell.
Currently I'm rendering the cell as a single Label control with a <br/> where the new lines are supposed to start. The export function handles this nicely insofar as it creates a new row in excel for each line, merging cells on columns not containing them.
Unfortunately this means that you cannot sort by any of the other columns since Excel complains that the merged cells are not the same size.
I've tried replacing the label with a multi-line textbox but that exports as some form of text box in Excel where you can't see the text.
Is there any way to override the multi-row behaviour for multi line cells so that it can export a grid cell into a single Excel cell with new-lines in it?
Eyup
Telerik team
 answered on 06 Feb 2020
3 answers
228 views

Not sure if this is the right place for the thread, but I cannot find a "RadComboBox" section.

Browser:

Microsoft Edge 44.18362.449.0

Telerik Control:

RadCombobox

Teleri Version:  Version=2017.3.913.45,

Issue:

When a item is selected and a postback is occured, the SelectedValue returns an empty string.

Expected behavior:

The correct SelectedValue should be return.

Thing that have been tried so far:

1: upgrade the telerik to the latest version (2020.114) ---> issue persists

2: set autopostback to "true" problem solved

3: use other browsers (chrome, FireFox, new Version 79.0.309.68 ) issue disappears

Sample code: 

1: aspx

<telerik:radcombobox
        id="ddlSupplier"
        runat="server"
        skin="Material"
        rendermode="Lightweight"
        cssclass="materializeit"
        enableloadondemand="true"
        inputcssclass="browser-default"
        width="100%"
        filter="Contains"
        highlighttemplateditems="true"
        showmoreresultsbox="false"
        onitemsrequested="ddlSupplier_ItemsRequested" autopostback="false">
    </telerik:radcombobox>

2: code behind

protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    protected void saveIssue_Click(object sender, EventArgs e)
    {
 
 
    }
 
    protected void ddlSupplier_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboBoxItem li = new RadComboBoxItem("Alan Jones (Brunel Systems Pty Ltd, test site)", "123");
 
        ddlSupplier.Items.Add(li);
 
         li = new RadComboBoxItem("Jackie Chiu (Optimum Construction, Optimum Construction (Sydney)) ", "23" );
 
        ddlSupplier.Items.Add(li);
 
         li = new RadComboBoxItem("Erik Baker (Optimum Construction, Optimum Construction (Sydney))", "2323");
 
        ddlSupplier.Items.Add(li);
    }
 
    protected void b_Click(object sender, EventArgs e)
    {
        var a = ddlSupplier.SelectedValue;  // most of the time returns "" for Edge
    }
Peter Milchev
Telerik team
 answered on 05 Feb 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?