Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
179 views
I updated my telerik controls for one of my .net vb.net projects to  version 2009.2.826.20 and now it seems the force postback for a button within a grid template column within an ajaxified radGrid is no longer doing the regular postback. I was previously using a pretty old version, that involved including a dll like RadGrid.Net2.dll. Anyway, below is my code that previously worked with the older version. When I updated the controls, I also went through and re-added the ScriptManager (on Master Page) and the radAjaxManager and the radGrid to the page and reset its settings, after I brought in the new telerik controls DLL. With the new version, the controls within the grid that are supposed to run ajaxified are working fine. But now it seems when I click the button, it does an ajax postback, instead of the regular postback I am trying to force. If I add an EnableAjax="false" to the radAjaxManger, everything runs without error, but obviously now it no longer does ajax postbacks for other controls within the grid that I want to use Ajax.

 
<script type="text/javascript"
 
function realPostBack(eventTarget, eventArgument) 
__doPostBack(eventTarget, eventArgument); 
 
</script> 
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  DefaultLoadingPanelID="AjaxLoadingPanel1"
     <AjaxSettings> 
 
         <telerik:AjaxSetting AjaxControlID="rdgResults"
             <UpdatedControls> 
                 <telerik:AjaxUpdatedControl ControlID="rdgResults" LoadingPanelID="AjaxLoadingPanel1" />   
             </UpdatedControls> 
         </telerik:AjaxSetting> 
        </AjaxSettings>        
    </telerik:RadAjaxManager> 
     
<asp:panel id="pnlsearch" runat="server" DefaultButton="btnSearch"
... 
 <telerik:RadGrid ID="rdgResults" runat="server" AllowPaging="True" AllowSorting="True" EnableEmbeddedSkins="False" Skin="radGridSkin" Width="100%" EnableOutsideScripts="True" GridLines="None"
    <MasterTableView AutoGenerateColumns="False" AllowNaturalSort="False" NoMasterRecordsText="No Special Permission Requests Found." 
            PageSize="20"   DataKeyNames="RequestID" BorderColor="#B5E9AD"
... 
<Columns> 
... 
            <telerik:GridTemplateColumn UniqueName="tmpEditColumn"
             <HeaderTemplate> 
                            Edit 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <div class="functionButtons"
                                <asp:Button runat="server" Text="" CssClass="btnEdit" ID="btnEdit"  CommandName="EditCustom"  /> 
                            </div> 
                        </ItemTemplate> 
            </telerik:GridTemplateColumn>                                    
         </Columns> 
 
       </MasterTableView> 
  
    
    </telerik:RadGrid> 
 
<asp:panel id="pnlReqEntry" runat="server"


Code to add the postback call to the button within the grid

   Protected Sub rdgResults_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rdgResults.ItemCreated 
        If (TypeOf e.Item Is GridDataItem) Then 
            Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) 
            Dim button1 As Button = CType(dataItem("tmpEditColumn").FindControl("btnEdit"), Button) 
 
           
            button1.Attributes.Add("onclick"String.Format("realPostBack('{0}', '{1}'); return false;", button1.UniqueID, button1.CommandArgument)) 
             
        End If 
    End Sub 

and in my web.config:

    <compilation debug="true"
      <assemblies> 
        <add assembly="Telerik.Web.Design, Version=2009.2.826.20, Culture=neutral, PublicKeyToken=121FAE78165BA3D4" /> 
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      </assemblies> 
    </compilation> 
<httpHandlers> 
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" /> 
    </httpHandlers> 
  </system.web> 
  <system.webServer> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <handlers> 
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> 
    </handlers> 


viewing the html source (had to set EnableAjax=false to even see this within the source html) for the button that should do a normal postback looks like:

  <input type="button" name="ctl00$ContentPlaceHolder1$rdgResults$ctl00$ctl04$btnEdit" value="" onclick="realPostBack('ctl00$ContentPlaceHolder1$rdgResults$ctl00$ctl04$btnEdit', ''); return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$rdgResults$ctl00$ctl04$btnEdit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))" id="ctl00_ContentPlaceHolder1_rdgResults_ctl00_ctl04_btnEdit" class="btnEdit" />


Is there something that has changed, regarding forcing postbacks with the newest version of the radGrid?

Paul J
Top achievements
Rank 1
 answered on 15 Oct 2009
1 answer
161 views
Hi,

Using the FileExplorer, I want to control the permitted behaviour for each item (file or directory).

Basically I am implementing a directory browser with download capability  BUT I need to restrict what can be downloaded bsed on a combination of file attributes and which user is logged in.

Using a custom provider, I can add attributes (and additional columns) to the grid - one of these indicates visually to the user whether they can perform a download (i.e. all the logic has been applied to determine whether they can download the item).

I have further implemented a test in the "Handler" so that if the user does try to "open" the item they are ignored. However I would like to go further and catch the attempt on the client side (maybe pop-up a window saying not allowed).

  1. However I note that on the client, I can't seem to get to the additional attributes which have been defined (presumably I could go through some convoluted steps to get the grid and then get the column from it), surely a clientside "Get_Attribute(name)" method would make sense?
  2. I also note that I cna't set the permissions of the file item on the server side (e.g. whilst processing the file items in the custom provider I tried setting the permissions and discover that they are readonly). Woudl it not be sensible to be able to control permission on each file tiem individually?

Andrew

Fiko
Telerik team
 answered on 15 Oct 2009
1 answer
86 views
Does anyone know if the Fast Navigation functionality is supported in a Multi-Calendar view.

I.E. I wish to display one year at a time.

It works OK with a single month, however as soon as either the MultiViewColumns or MultiViewRows is changed from 1 (i.e. 3 and 4) the Fast Navigation stops working

Thanks

Andrew
 
Pavlina
Telerik team
 answered on 15 Oct 2009
2 answers
139 views
Hi,
I'm using a RadComboBox bind by WebService wich is into a RadContextMenu ItemTemplate :

    
    <telerik:RadContextMenu ID="RCMU" runat="server" ... > 
        <Items> 
            ... 
            <telerik:RadMenuItem Value="5"
                <ItemTemplate> 
                    <telerik:RadComboBox ID="CMRDDLC" runat="server"  
                        ShowMoreResultsBox="false" EnableVirtualScrolling="true" EnableItemCaching="true"  
                        EnableTextSelection="true" EnableViewState="False"  
                        EnableLoadOnDemand="true" ZIndex="10000" 
                        OnClientItemsRequesting="OnClientItemsRequesting"
                        <WebServiceSettings  Path="~/.asmx" Method="GetMethod" /> 
                        <CollapseAnimation Duration="100" Type="OutQuint" /> 
                    </telerik:RadComboBox> 
                </ItemTemplate> 
            </telerik:RadMenuItem> 
            ... 
        </Items> 
    </telerik:RadContextMenu> 

So far, everything is going well.

But when I click on an element of the RadComboBox, the DropDownList is hidden and the context menu too, and I want the menu stays open.

I've tried codes as "set_cancel(true)" to stop the click event propagation on radComboBox but nothing works, I also tried to find wich element cause the close of the contextual menu but i haven't find methods that helps, any ideas ?


Best regards

EDIT: I'm using Q1 2009 (402.35) :)




Yana
Telerik team
 answered on 15 Oct 2009
1 answer
67 views

I recently purchased the AJAX RADControls since read that it is one of the best AJAX libraries available.

I am trying to move my web apps into AJAX. I use server controls only for the initial page rendering of the DOM elements and then make web-service calls (using PageMethods or WCF) to populate or manipulate any grids, forms or data that exist in the page.

I added some of the Telerik controls to replace plain HTML tags (such as drop-down lists, inputs, etc.) but it is difficult it is to find these controls in the DOM in order to manipulate them (especially when they are embedded within other ASP.Net server controls).

To find a Telerik Control I have to resort to such calls as:
 
var combo = $find("<%= RadComboBox1.ClientID %>");
var item = combo.findItemByText(text);

(By the way, this code above will NOT run when you place your script code in a separate JS file which is a best practice that I prefer to follow.)

I am trying to use these controls for 100% strictly data access via AJAX.
I don't need the ASP.Net engine to assign them an ID in the DOM, I want to control this ID myself so that I can more easily access them from my scripts.

Can I define my own Client IDs when I place controls on a page declaratively or programmatically?

Can I assign the Client IDs of the RADControls when using ASP.NET MVC?

Let me know if this level of control is possible with RADControls.

Klaus Barkhausen

Georgi Krustev
Telerik team
 answered on 15 Oct 2009
1 answer
263 views
Good afternoon,

I am now using RadControls for ASP.NET AJAX 2009 2 701. I upgraded from ASP.NET AJAX 2009 1 527. After I upgraded I made some changes to a web site that I had working. Now the web page will build but when I try and run it I get the following error:

Warning 1 ASP.NET runtime error: The base class includes the field 'RadScriptManager2', but its type (Telerik.Web.UI.RadScriptManager) is not compatible with the type of control (Telerik.Web.UI.RadScriptManager). 

I tried to rename it but that didn't work. I am not sure what to do. Can anyone help?

My Web Config looks like the following:

<

 

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"/>

 

 

<a

 

dd 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"/>

 

 

<

 

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

 

 

<

 

add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>  

 

 

</

 

httpHandlers>

 

 

 

 

 

<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"/>

 

 

<

 

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

 

 

<

 

add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>

 

 

</

 

handlers>

 

 

 

 

 

 

 

I would appreciate any help that is given.

Atanas Korchev
Telerik team
 answered on 15 Oct 2009
1 answer
90 views

Hello,
We have a straight behavior and don’t know how we can fix it.

We have an autocomplete textbox and in the next line right below, we have a RadCombobox.

Scenario:

A user tips some characters in the autocomplete textbox and the autocomplete list is shown. -> OK.

The user selects a item of the list with a mouse click. -> OK

The item will be selected -> OK

The list will be closed -> OK

The list of the RadCombobox will be opened -> Not OK!!!

The behavior appears only if the mouse cursor is over the combobox-textfield.

 

How can we fix it?  

best regards
lemon

Yana
Telerik team
 answered on 15 Oct 2009
1 answer
53 views
Hi,

I made a usercontrol using AJAX in .NET.
In my VS environnement, it works fine but, when I try to use it on our webserver, I got this error message :

Impossible d'effectuer un cast d'un objet de type 'System.Web.Configuration.ScriptingProfileServiceSection' en type 'System.Web.Configuration.ScriptingProfileServiceSection'.


When I put the "System.Web.Configuration.ScriptingProfileServiceSection" and the "System.Web.Configuration.ScriptingAuthenticationServiceSection" in comment in my web.config file, my control works but, the AJAX refreshing didn't work.

So, it seems that the Ajax.NET need this references in the web.config file but, I don't know why it didn't work.

As I saw in other thread, I also try to remove the "xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0" reference but my control still doesn't work.

I hope someone can help me.

Thanks,

Fabian
PROMISYS
Atanas Korchev
Telerik team
 answered on 15 Oct 2009
1 answer
74 views
Hi,

We are using the following version of Rad Controls together in our portal.

Telerik RadControl for Asp.net Ajax :  version 2009.1.402.35

Telerik RadControls for Silverlight 3 : version 2009.2.925.1030

We are receving JS error's when the site is browsed in IE8.

PFA for the type of error.

I am receiving JS error's particularly when using Asp.net Ajax control's.

Let me know the latest version that needs to be downloaded.

Any help would be greatly appreciated.







Atanas Korchev
Telerik team
 answered on 15 Oct 2009
1 answer
100 views
I am having a problem with date formats.  I am adding a date picker in my code behind.  When I select the date, it appears in the correct format in the textbox (10/19/2009) but when I retrieve the value through javascript it shows it in another format (2009-10-22). 

The code to add the date picker appears below.

            RadDatePicker dPick = new RadDatePicker();
            dPick.ID = "DateField1";
            dPick.Culture = CultureInfo.GetCultureInfo("en-US");
            plcForm.Controls.Add(dPick);

The javascript code I use to retrieve the value appears below:

        function TestForm()
        {
            alert(document.forms[0].DateField1.value);
        }

Am I setting the culture format incorrectly?



robertw102
Top achievements
Rank 1
 answered on 15 Oct 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?