Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
280 views
  I recieved this error using my RadGrid after adding a GridButton with an Image.
  I saw a few different fixes posted by Telerik and I just want to clearify that I understand them so that I can use the best one.
 First, these are not the issue for my problem page:

Calls to Response.Write():
Response filters:
HttpModules:
Calls to Server.Transfer():

  Second, after pouring over many posts within and without telerik, I think I understand that this is not really a telerik issue, but an ajax issue, is this correct ?
  I see that one cause for this is clicking to many times, or , sending to many ajax requests ?
  In essense, when ajax sends the page back, their are other parts of the page that are trying to be rendered along with what ajax is trying to render ?

  
  Here are the questions I have about the proposed fixes I have seen in telerik posts:
1) EnableEventValidation=false. This scares me, through a small amount of research I see that this is ok for pages that do not need a lot of security ? I wonder what "a lot" means. Plus, I intend on using my current grid scheme as a template for many other grid pages some of which have data CRUD.
 2) Anyway, I also found this as a proposed fix, but it looks like I am playing with a part of  EnableEventValidation=false.

<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == 'function' && ValidatorOnSubmit() == false) return false;
return true;}
function ValidatorOnSubmit() {if (!document.getElementById('__EVENTVALIDATION')) {
alert('Please wait for the page to load completely'); document.location.href = 'http://something';return false;}
else {return true;}}
// -->
</script>



  3)  Another proposed fix is : <AnyAjaxEnabledControl>.SetMaxRequestQueueSize(5);  I tried to put this in my page load but it
       looks like It is not in my version of telerik ? ("Telerik.Web.UI.dll 2008.3.1125.35 Trial version"). 
      I code it like this :

if

(!IsPostBack)

 

{

RadAjaxManager1.SetMaxRequestQueueSize(0);

 

 

}
      Compiler Error Message: CS1061: 'Telerik.Web.UI.RadAjaxManager' does not contain a definition for 'SetMaxRequestQueueSize' and no extension method 'SetMaxRequestQueueSize' accepting a first argument of type 'Telerik.Web.UI.RadAjaxManager' could be found (are you missing a using directive or an assembly reference?)

  Thanks for your time and your Rad Controls !!
 
IQworks
Top achievements
Rank 1
 answered on 21 Mar 2009
2 answers
228 views
I am creating web application in which i am using Radeditor. i have to upload images within my content. i am uploadin image using ImageManager. Now according to my project requirement i have to store image name, extension and path of the image on server in the sql server 2005 table.. so how i can achieve this......Thanks in Advance

Language :c#
.net 2.0
ASPNET AJAX Q3 2008
Gurpreet
Top achievements
Rank 1
 answered on 21 Mar 2009
2 answers
121 views
Hi

Im trying to fire an ItemCommand inside a RadGrid. But nothing happens.  I added a GridButtonColumn just for testing and when i press this one it does fire the event. Only the elements inside   <tel:GridTemplateColumn><ItemTemplate> does not work.

 <tel:RadGrid ID="ShoppingCardRadGrid" runat="server" AutoGenerateColumns="false" 
                OnItemCommand="ShoppingCardRadGrid_ItemCommand"  
                OnItemDataBound="ShoppingCardRadGrid_ItemDataBound" 
                EnableEmbeddedSkins="False" CssClass="tableDesign" ImagesPath="../images/generic/buttons/Grid"
                <FooterStyle HorizontalAlign="Center" /> 
                <AlternatingItemStyle BackColor="#FDF2F2" /> 
                <PagerStyle PagerTextFormat="" NextPageImageUrl="../images/generic/buttons/radGridForward.gif" 
                    PrevPageImageUrl="../images/generic/buttons/radGridBackwards.gif" HorizontalAlign="Center" /> 
                <MasterTableView NoMasterRecordsText="Your shopping cart is empty" ShowFooter="true"
                    <Columns>

then I have these 3 buttons. Only the last one fires the event.
  <tel:GridTemplateColumn> 
                            <ItemTemplate> 
                                <asp:LinkButton runat="server" ID="btnRemove" Text="Remove" CommandName="Remove" 
                                    CommandArgument='<%# Eval ("TicketId") %>'></asp:LinkButton> 
                            </ItemTemplate> 
                        </tel:GridTemplateColumn> 
                        <tel:GridTemplateColumn> 
                            <ItemTemplate> 
                                <asp:Button ID="Button1" runat="server" Text="Button" CommandName="Remove"/> 
                            </ItemTemplate> 
                        </tel:GridTemplateColumn>                                        
                       <tel:GridButtonColumn ButtonType="PushButton" CommandName="ThisDoesTriger"></tel:GridButtonColumn> 


Jeppe
Top achievements
Rank 1
 answered on 21 Mar 2009
4 answers
363 views
I was using version 2008.3.1125 of the RadControls in a project. Because of this, I had the following entries in my web.config file:

<system.web> 
    <httpHandlers> 
        <add path="Telerik.Web.UI.DialogHandler.aspx" 
            type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
            verb="*" validate="false" /> 
        <add path="Telerik.Web.UI.SpellCheckHandler.axd" 
            type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
            verb="*" validate="false" /> 
        <add path="Telerik.Web.UI.WebResource.axd" 
            type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
            verb="*" validate="false" /> 
    </httpHandlers> 
</system.web> 
<system.webServer> 
    <handlers> 
        <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" 
            type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
        <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" 
            type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
    </handlers> 
</system.webServer> 
 

After updating the RadControls to the latest version (by modifying the file bin/Telerik.Web.UI.dll.refresh to point to the new version), I got the following runtime errors when opening a page:

Could not load file or assembly 'Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

After some searching, I found out that this is caused by the registration of the HttpHandlers, because the web.config entries include the exact version of the telerik DLL used at the time the controls were added to the project.

The problem was finally solved by removing the version number from the handler registrations, e.g:

<add path="Telerik.Web.UI.DialogHandler.aspx" 
    type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" 
    verb="*" validate="false" /> 
 

My question is: why are the HttpHandlers registered including the version number, culture and public key? Wouldn't it make more sense (and make the life of developers easier), if the handlers were registered without the version number?

Thanks.

---
Martin

Lyle Groome
Top achievements
Rank 2
 answered on 20 Mar 2009
3 answers
189 views
Hello, we are interested in implementing a custom image manager that reads and writes images from an Oracle database.  I believe your live demo for "Editor/Custom File Dialogs Content Provider" is pretty similar to what we are trying to do however I'm having trouble finding a complete set of source code for that demo.  Can you direct me to where I can get the complete set of source code for that demo?

Thanks
Kevin
Top achievements
Rank 2
 answered on 20 Mar 2009
1 answer
133 views
Is it possible to have different column editors on a per row basis.

Lets say I have this data where the first field in the name and the second field is the value. The value can be a date, string, int, decimal etc... I want to be able to supply a "Column" editor depending on the Type for the Value field in that row.

Sample Data
<Name, Value> where Name is a string and Value is an Object (Name is read only in the grid but Value needs an Editor)
"ADate", DATE
"AString", "A String"
"An Int", 5

If it is possible to have each row contain a different editor, can you give me some tips on how install a custom editor on a per row basis?

Thanks.
Mark.

MarkInTexas
Top achievements
Rank 1
 answered on 20 Mar 2009
4 answers
150 views
I'm using two Calendar date/time pickers to set a date range that is used for a SQL DB lookup. I only want the user to be able to select a date that is no more then 30 days from the current date/time in both date pickers. The max date is always today's date/time.

I can get the calendar to only allow 30 days from today but it produces an error  if I choose the last available date (today - 1 month).

The code that I am using is as follows:

Protected Sub RadDateTimePicker1_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles RadDateTimePicker1.Load  
        Dim dt As New DateTime()  
        dt = RadDateTimePicker1.MinDate  
        dt = Date.Now.AddMonths(-1)  
        RadDateTimePicker1.MinDate = dt  
        RadDateTimePicker1.MaxDate = Date.Now  
    End Sub 
 
    Protected Sub RadDateTimePicker2_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles RadDateTimePicker1.Load  
        Dim dt As New DateTime()  
        dt = RadDateTimePicker2.MinDate  
        dt = Date.Now.AddMonths(-1)  
        RadDateTimePicker2.MinDate = dt  
        RadDateTimePicker2.MaxDate = Date.Now  
    End Sub 

 

Any suggestions on how to prevent the error icon (triangle) and only allow 30 days from the current date/time?

 

Thanks,

Joe

Joe
Top achievements
Rank 2
 answered on 20 Mar 2009
5 answers
133 views
I update to Telerik Q1 2009, also, change TreeView web service from asmx to svc.
Here is the piece of code from Telerik Help:

<script type="text/javascript">
   
function nodePopulating(sender, eventArgs)
   {
       varnode = eventArgs.get_node();
       var context =eventArgs.get_context();
       context["CategoryID"] =node.get_value();
   }
</script>

   [OperationContract]
   
publicRadTreeNodeData[] GetTreeViewCategories(RadTreeNodeDatanode, object context)
   {
       
// extract the"context" dictionary information. OnClientNodePopulating event loads thedictionary
       
IDictionary<string, object> contextDictionary =(IDictionary<string,object>)context;
....
   }

I get the error:

System.InvalidCastException was unhandled by user code
  Message="Unable to cast object of type 'System.Object' to type 'System.Collections.Generic.IDictionary`2[System.String,System.Object]'."
  Source="App_Code.3vtfiouj"
....

How do I fix it?

Thanks.
tom
Top achievements
Rank 1
 answered on 20 Mar 2009
1 answer
124 views
I am not sure what I have done wrong but after adding a control and then trying to use the ..Build Control in the context menu I am getting the following error:

RadPanelBar - RadPanelBar1
There was an error rendering the controI.
'Items' could not be initialized. Details: [A] Telerik.Web.UI.RadPanelBar cannot be cast to [B] Telerrik.Web.UI.RadPanelBar. Type A originates from 'Telerik.We.UI,Version=2009.1.311.35, Culture=neutral, ........ in the context 'LoadNeither'

This is a rather large error however it just refers the different paths of the same telerik.web.ui version.
Any ideas?

Helen
Telerik team
 answered on 20 Mar 2009
7 answers
278 views
Hi,

Is it possible to set minimum prefix length for Auto complete combo

like When i enters "an" then only it should show the list of name start with "an"

and not on just click

Thanks
Anand
Jim
Top achievements
Rank 1
 answered on 20 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?