Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
85 views
HI,

I have been asked to upgrade a web application to RadControls ASP.NET AJAX Q3 2011 from Telerik ASP.NET Q3 2007  ( I know !!!!) . I am using a master page, dev language is c# and am targetting .net 4 framework.

I have ran the upgrade wizard and emoved all reference to previous Telerik versions,

Problem is I get the following error when launching master page "Using themed css files requires a header control on the page." ( I'm not using a themed css as far as I can see )....
When I add runat="server" to the master page I get the following error when I launch a page containing RadGrid "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."

so I am in a vicious circle !!!

I searched all forum but the answers always relate to .NET 2.0...

Any suggestions on this?

Thanks so much in advance,
John
John McNamara
Top achievements
Rank 1
 answered on 22 Feb 2012
0 answers
143 views
Hi all,
I am using the Entity Framework and everything is working fine. (According to this Demo)
Now I want to expand my application,  I want to change the radgrid's datasource when I click on a button I set in my form.
And of course it should be possible to edit/update the radgrid with the other datasource. (This should all be made in the codebehind)

Can somebody help me please?
Thanks,
esmyy
esmyy
Top achievements
Rank 1
 asked on 22 Feb 2012
12 answers
390 views

I was wondering if anyone has figured out the following

I have 4 items that have to be able to be refreshed from the Ajax manager control itself. 

 

<

telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

    <UpdatedControls>

 

 

        <telerik:AjaxUpdatedControl ControlID="pnlOrganizationMeta" />

 

 

        <telerik:AjaxUpdatedControl ControlID="pnlOrganizationList" />

 

 

        <telerik:AjaxUpdatedControl ControlID="pnlProjectList" />

 

 

        <telerik:AjaxUpdatedControl ControlID="pnlStakeholderList" />

 

 

     </UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

 

 

<

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

    <script type="text/javascript">

 

 

        function refreshGrid(arg) {

 

 

        if (arg != null) {

 

            $find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest(arg);

 

            }

        }

 

 

    </script>

 

 

</telerik:RadCodeBlock>

 

 


 I am using Javascript to get the results of a radwindow close event.  currently all of the items show the loading panel even though only one of them is actually being updated.  Is there any way I could dynamically choose which one is updated or at least only show the loading panel for that one.   With the older versions of the Telerik suite we would have multiple Ajax Managers on the page and control which one was updated depending on the argument passed to the Javascript.  With the new version you can only have one AjaxManager on the page.

Thanks

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

    <script type="text/javascript">

 

 

        function refreshGrid(arg) {

 

 

        if (arg != 'pnlOrganizationMeta') {

 

            $find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest(arg);

 

            }
        if (arg != 'pnlProjectList') {

 

            $find(

"<%= RadAjaxManager2.ClientID %>").ajaxRequest(arg);

 

            }

 

 

        }

 

 

    </script>

 

 

</telerik:RadCodeBlock>

 

 

 

Maria Ilieva
Telerik team
 answered on 22 Feb 2012
3 answers
130 views
Hi,

In our application we use the treeview to show parent/child records. Sometimes the trees will be filled with more than 1000 records and multiple levels. At one page the trees are loaded and hidden by a panel, when a button is pressed (or somewhat), the trees will be visible. The trees will switch between hidden/visible within one second without AJAX, but with AJAX about 20-30 seconds (no joke!!).

I can't reproduce this when run locally but it happens at our production servers (also tested at other servers). Users with very fast internet connection have this problems too.

We're using RadCompression, GZip and RadSessionState compression (10x smaller pages).

We've tried:
- Turning off all compressions (no effects)
- Hide panels with display: none instead of visible = false (no effects, bigger pagesize)
- Turning off AJAX (not bad performance)
- Tree load when requested (after button press)

We don't like to use Load On Demand because the most trees have many levels and heavy used.
All trees are bound with cached data, so not connected to databases.

It seems the most time are spent in AJAX call.

I hope you know this issue?
Bozhidar
Telerik team
 answered on 22 Feb 2012
1 answer
85 views
I just switched from 2011 Q3 to 2012 Q1 (2012.1.215.40) and the datapager on my main search page instantly became visible in both firefox and chrome. It used to be invisible, as I've done this:

<telerik:RadDataPager ID="uiDataPager1" runat="server" PagedControlID="uiSearchResults"
                                PageSize="10"
                                Visible='<%# Container.PageCount != 1%>'
                                >

The control is intended to be hidden when no results are found, i.e. PageCount != 1. This used to work. Now, the datapager is rendered as a gray box with this HTML

<div id="ctl00_MainContent_uiSearchResults_uiDataPager1" class="RadDataPager RadDataPager_Default">
                <input type="hidden" name="ctl00_MainContent_uiSearchResults_uiDataPager1_ClientState" id="ctl00_MainContent_uiSearchResults_uiDataPager1_ClientState" autocomplete="off">
            </div>

I would consider this to be a bug.

Any idea for a workaround until a fix is ready?


Best regards

Jan

Antonio Stoilkov
Telerik team
 answered on 22 Feb 2012
0 answers
115 views
Hi again,

I have 2 RadGrids - RadGrid1 and RadGrid2.
For RadGrid1 I have EnablePostbackOnRowClick = true and have handler functions for OnSelectedIndexChanged event and the OnRowSelect event. The first one is a function in CodeBehind file that gets datakey values of RadGrid1 -> Executes a parameterized SP -> Equates RadGrid2.DataSource to the DataTable returned -> calls RadGrid2.Rebind().

The setup works fine and I am able to populate RadGrid2 based on the row selection in RadGrid1. But, when I debug the application and check for the value of Page.IsPostBack, I get confused.

First time when application loads, Page.IsPostBack is false. When I select a row, value of Page.IsPostBack becomes true. But, when I keep on selecting rows again and again, then after 2-3 times, Page.IsPostBack value becomes false again. And this keeps happening periodically. Due to this inconsistency, the OnNeedDataSource handler function of both the grids are called. Due to this, I am not able to restrict my logic using IsPostback attribute.

Please help.

Regards,
Anup

Anup
Top achievements
Rank 1
 asked on 22 Feb 2012
1 answer
66 views
Hello,

I have the scheduler in one of my pages. It works great on my machine, I am able to add appointments to it with out a problem. After I publish it the first time I load the page it will usually display correctly. The second time it throws an error. Then the next day it seems fine for a while but eventually throws the error again just for loading the page. I am not sure what the problem is or why it is so temperamental. The base type of the page had to be changed to Telerik.Web.UI.RadAjaxPage because it is hosted on godaddy and runs in medium trust.

I thank you in advance for any insight you may have.

Below is the error:

Server Error in '/' Application.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +78
   System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() +32
   System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() +25
   System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) +160
   System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object& loaderCookie, Dictionary`2& typesInLoading, List`1& errors) +166
   System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +316
   System.Data.Metadata.Edm.ObjectItemCollection.ExplicitLoadFromAssembly(Assembly assembly, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +53
   System.Data.Metadata.Edm.MetadataWorkspace.ExplicitLoadFromAssembly(Assembly assembly, ObjectItemCollection collection, Action`1 logLoadMessage) +93
   System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly, Action`1 logLoadMessage) +130
   System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +572
   System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +77
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
   Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.GetAppointments(RadScheduler owner) +160
   Telerik.Web.UI.SchedulerProviderBase.GetAppointments(ISchedulerInfo schedulerInfo) +27
   Telerik.Web.UI.RadScheduler.BindAppointments() +113
   Telerik.Web.UI.RadScheduler.PerformSelect() +97
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
   Telerik.Web.UI.RadScheduler.EnsureDataBound() +12
   Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +63
   Telerik.Web.UI.RadScheduler.CreateChildControls() +10
   System.Web.UI.Control.EnsureChildControls() +102
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

Plamen
Telerik team
 answered on 22 Feb 2012
1 answer
140 views
Hi,
I'm using asp.net ajax tool and I create dynamically 3 RadNumeric TextBoxes with names  RadNumTxt1, RadNumTxt2, RadNumTxt3. 
I create the Text Boxes as follow:
            for (int i = 1; i <= 3; i++){
                    RadNumericTextBox RadNumTxt = new RadNumericTextBox();
                    RadNumTxt .ID = "RadNumTxt" + i;
                    RadNumTxt.AllowOutOfRangeAutoCorrect = true;
                    RadNumTxt.Culture.CultureTypes.Equals("en-US");
                    RadNumTxt.DataType.BaseType.Equals("System.Double");
                    RadNumTxt.Display = true;
                    RadNumTxt.Enabled = true;
                    RadNumTxt.Visible = true;
                    RadNumTxt.ClientIDMode = System.Web.UI.ClientIDMode.Static;
                    PanelCompMembers.Controls.Add(RadNumTxt);
            }
After rendering the page in browser the ids of the  Numeric Texts Boxes have been changed into RadNumTxt1_text, RadNumTxt2_text, RadNumTxt3_text. 

When I try to change the value of these inputs with javascript in client by using the new ids of the inputs like "RadNumTxt1_text" I change them, but when click on them the values that I have change disappeared.  What I am doing wrong?

Veli
Telerik team
 answered on 22 Feb 2012
9 answers
206 views

Hello.

In the web application I have been developing, there is a web page page that uses the RadScheduler component with web service binding.
The RadScheduler component displays appointments grouped by resources.
Since the resources are loaded by a stored procedure that requires input parameters, class SchedulerInfo has been extended:

public class SchedulerInfoExt : SchedulerInfo
{
 public Int16 ClubId { get; set; }
 public String ResourceType { get; set; }
 public String MembershipNumber { get; set; }
 public String InsertResult { get; set; }
  
 public SchedulerInfoExt(ISchedulerInfo baseInfo, Int16 clubId, String resourceType, String membershipNumber) : base(baseInfo)
 {
  ClubId = clubId;
  ResourceType = resourceType;
  MembershipNumber = membershipNumber;
  InsertResult = "";
 }
  
 public SchedulerInfoExt()
 {
 }
}

In the web page, a RadDock component is used to implement a form that allows users to create appointments.
In the Data Provider class, the Insert method validates the business rules and creates the appointment. The scheduler info property InsertResult is set by the Insert method, indicating if the insertion was successful, if there was an error or if there was a violation of the business rules.

On the client side, function AppointmentsPopulated, associated with event OnClientAppointmentsPopulated, is supposed to display a message based on the content of the scheduler info property InsertResult, informing the user if the appointment was created or if there was an error.

Is it possible to access the scheduler info property InsertResult from the client side function AppointmentsPopulated?

Thank you in advance.
Paulo

Plamen
Telerik team
 answered on 22 Feb 2012
1 answer
129 views
I have tried everything I know of to override the inline zIndex of 7000 that is used for RadGrid Header Context menu.
I can see that the rad grid's Context Menu element's style's zIndex is changed to a higher number than the AjaxControlToolkit's ModalPopup in which the RadGrid is shown but still the Context menu appears behind the ModalPopup. My previous method for Q3 2011 where I specified a class for the Header Filter Menu

.modalRadFilterMenu
{
   z-index:111001 !important;
}

stopped working after 2011-3-1305 introduced inline styling for the context menu.

I used both the Client events HeaderMenuShowing and GridCreated to set the zIndex - the code fired the Zindex was changed but the menu still appears behind the ModalPopup - what next??

                    function HeaderMenuShowing(sender, eventArgs) {
                       var mnEle = eventArgs.get_menu().get_element();
                       mnEle.style.zIndex = 111011;
                     }
                     function GridCreated(sender, eventArgs) {
                        var grid = sender;
                        var headerContextMenu = grid.get_headerMenu();
                        var grEle = headerContextMenu.get_element();
                        grEle.style.zIndex = 111011;
                     }
Veli
Telerik team
 answered on 22 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?