Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
424 views
Hai Everyone,

First of all thanking for the great support from the Telerik team.


I need to fire the detail table databind event of the rad grid on
the selected index changed of the radcombo Box.
Please give the solution.


Regards
Unni.


Rahul Barpha
Top achievements
Rank 1
 answered on 06 May 2010
1 answer
213 views

I am trying to fine tune telerik .net application and need some expert help.

I used dot trace and yourkit profiler tools to come up with below page load stats. dot trace profiler gives method name, percent of time, actual time and number of calls per GUI event. At this point I am not sure how to read yourkit stats.

I have a transaction screen with 2 drop downs, two buttons and a blank(always) grid that is not attached to any database. Each button displays Ajax grid on click events.

All my grids are populated via database views and handle DML via stored procedures. Hence at any given point they are not attached/bounded to database table. I am not sure if they are bounded via db view or not. I hope not.

Also attached screen shot of web page.

Question
1) DO you see any unwanted methods called in page load event?
2) How to improve page load performance? Any basic things to look at?

IF REQUIRED I CAN GIVE LIVE APPLICATION ACCESS TO INTERESTED CANDIDATES.


STATS FROM DOT TRACE PROFILER TOOL

STATS FROM DOT TRACE PROFILER TOOL  
----------------------------------  
99.98 % System.Web.Hosting.ISAPIRuntime.ProcessRequest... - 154.74 ms - 1 call  
  65.01 % ProcessRequest - 100.62 ms - 1 call - ASP.school_fee_transaction_v1_aspx.ProcessRequest(HttpContext)  
    65.01 % System.Web.UI.Page.ProcessRequest... - 100.62 ms - 1 call  
      13.37 % FrameworkInitialize - 20.70 ms - 1 call - ASP.default_master.FrameworkInitialize()  
      12.88 % RenderPageInAjaxMode - 19.94 ms - 1 call - Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter, Control)  
      7.73 % Page_Load - 11.97 ms - 1 call - TelerikComponentsWS.school.fee_transaction_v1.Page_Load(Object, EventArgs)  
      7.02 % OnLoad - 10.87 ms - 3 calls - Telerik.Web.UI.RadGrid.OnLoad(EventArgs)  
      3.11 % Page_Load - 4.82 ms - 1 call - TelerikComponentsWS.Default.Page_Load(Object, EventArgs)  
      1.33 % OnPreRender - 2.06 ms - 9 calls - Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs)  
      0.83 % OnPagePreRender - 1.28 ms - 1 call - Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object, EventArgs)  
      0.65 % SaveViewState - 1.01 ms - 3 calls - Telerik.Web.UI.RadGrid.SaveViewState()  
      0.56 % TrackViewState - 0.87 ms - 3 calls - Telerik.Web.UI.RadGrid.TrackViewState()  
      0.48 % OnPreRender - 0.74 ms - 2 calls - Telerik.Web.UI.RadComboBox.OnPreRender(EventArgs)  
      0.46 % OnInit - 0.70 ms - 3 calls - Telerik.Web.UI.RadGrid.OnInit(EventArgs)  
      0.34 % ControlPreRender - 0.53 ms - 3 calls - Telerik.Web.UI.RadGrid.ControlPreRender()  
      0.26 % SaveViewState - 0.40 ms - 2 calls - Telerik.Web.UI.HierarchicalControlItemContainer.SaveViewState()  
      0.20 % GetScriptReferences - 0.31 ms - 9 calls - Telerik.Web.UI.RadWebControl.GetScriptReferences()   (from System.Web.UI.IScriptControl)  
      0.19 % FrameworkInitialize - 0.30 ms - 1 call - ASP.school_fee_transaction_v1_aspx.FrameworkInitialize()  
      0.08 % OnPreRender - 0.13 ms - 1 call - Telerik.Web.UI.RadAjaxLoadingPanel.OnPreRender(EventArgs)  
      0.08 % OnPreRender - 0.13 ms - 1 call - Telerik.Web.UI.RadPanelBar.OnPreRender(EventArgs)  
      0.08 % OnPreRender - 0.12 ms - 1 call - Telerik.Web.UI.RadTabStrip.OnPreRender(EventArgs)  
      0.08 % GetScriptReferences - 0.12 ms - 3 calls - Telerik.Web.UI.RadGrid.GetScriptReferences()  
      0.07 % OnPreLoad - 0.12 ms - 1 call - TelerikComponentsWS.Common.Screen.OnPreLoad(EventArgs)  
      0.07 % GetScriptReferences - 0.10 ms - 4 calls - Telerik.Web.UI.RadDataBoundControl.GetScriptReferences()   (from System.Web.UI.IScriptControl)  
      0.05 % get_Visible - 0.08 ms - 100 calls - Telerik.Web.UI.ControlItem.get_Visible()  
      0.05 % SaveViewState - 0.08 ms - 2 calls - Telerik.Web.UI.ControlItemContainer.SaveViewState()  
      0.04 % OnPagePreRenderComplete - 0.06 ms - 1 call - Telerik.Web.UI.RadAjaxControl.OnPagePreRenderComplete(Object, EventArgs)  
      0.03 % CreateChildControls - 0.05 ms - 1 call - Telerik.Web.UI.RadWindowManager.CreateChildControls()  
      0.02 % GetScriptReferences - 0.04 ms - 12 calls - Telerik.Web.UI.ProxyScriptControl.GetScriptReferences()  
      0.02 % GetScriptReferences - 0.03 ms - 1 call - Telerik.Web.UI.RadAjaxManager.GetScriptReferences()  
      0.02 % SaveViewState - 0.03 ms - 21 calls - Telerik.Web.UI.RadComboBoxItem.SaveViewState()  
      0.02 % get_Visible - 0.03 ms - 58 calls - Telerik.Web.UI.RadWebControl.get_Visible()  
      0.02 % OnPreRender - 0.02 ms - 12 calls - Telerik.Web.UI.ProxyScriptControl.OnPreRender(EventArgs)  
      0.02 % GetScriptReferences - 0.02 ms - 1 call - Telerik.Web.UI.RadAjaxLoadingPanel.GetScriptReferences()  
      0.01 % CreateChildControls - 0.02 ms - 1 call - Telerik.Web.UI.RadAjaxManager.CreateChildControls()  
  6.40 % Create_ASP_school_fee_transaction_v1_aspx - 9.90 ms - 1 call - __ASP.FastObjectFactory_app_web_4t1y1uv0.Create_ASP_school_fee_transaction_v1_aspx()  
    6.23 % school_fee_transaction_v1_aspx..ctor - 9.64 ms - 1 call - ASP.school_fee_transaction_v1_aspx..ctor()  
      0.17 % ReadStringResource - 0.26 ms - 1 call - System.Web.UI.TemplateControl.ReadStringResource()  
      0.00 % set_AppRelativeVirtualPath - 0.00 ms - 1 call - System.Web.UI.TemplateControl.set_AppRelativeVirtualPath(String)  
      0.00 % fee_transaction_v1..ctor - 0.00 ms - 1 call - TelerikComponentsWS.school.fee_transaction_v1..ctor()  
      0.00 % set_ScriptTimeout - 0.00 ms - 1 call - System.Web.HttpServerUtility.set_ScriptTimeout(Int32)  
      0.00 % get_Server - 0.00 ms - 1 call - System.Web.UI.Page.get_Server()  
      0.00 % GetWrappedFileDependencies - 0.00 ms - 1 call - System.Web.UI.Page.GetWrappedFileDependencies(String [])  
 
STATS FROM YOURKIT PROFILER TOOL  
----------------------------------  
Method Name Time(ms)    sample  
System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)   703 1  
ASP.school_fee_transaction_v1_aspx.ProcessRequest(HttpContext)  703 1  
System.Web.UI.Page.ProcessRequest(HttpContext)  703 1  
Telerik.Web.UI.RadGrid.SaveViewState()  703 1  
Telerik.Web.UI.NestedState.SaveViewState(Object)    703 1  
Telerik.Web.UI.NestedState.GetNestedStateManagerProperties(Object)  703 1 

 

 

shanker bangari
Top achievements
Rank 1
 answered on 06 May 2010
2 answers
235 views
We are having an internal debate as to whether or now we should deploy the Prometheus controls with UseEmbeddedScripts and UseEmbeddedSkins enabled. It would be much faster to deploy with it turned on, because otherwise we would have to go through and change the setting on each of the controls and then move the skins and scripts out to the server. Opponents to the using embbeded resources are claiming the following as concerns:

1. Compressibility of the CSS/JS files,

2. When/how/if things are cached client side. (IF is the operative word?)

3. How a load balancer/load balancing situation would help/hurt

Can you provide any information as to how performance is affected by using embedded resources versus using static resources for the Prometheus controls?

Thanks,
Adam

Basel Nimer
Top achievements
Rank 2
 answered on 06 May 2010
1 answer
108 views
Hi,

I am trying to figure out how to apply a custom sort using the RadListView which is inside a RadAjaxPanel.  Whenever I click on a LinkButton to cause a sort change, all the link buttons disappear.

Here is some code that shows the ascx layout:
    <telerik:RadAjaxLoadingPanel   
        ID="RadAjaxLoadingPanelDiscussion"  
        Transparency="1" 
        Width="100%" 
        Height="100%" 
        runat="server" /> 
    <telerik:RadAjaxPanel  
        ID="RadAjaxPanelDiscussion"  
        LoadingPanelID="RadAjaxLoadingPanelDiscussion" 
        runat="server"  
        > 
        <telerik:RadListView  
            ID="RadListViewDiscussion"  
            DataSourceID="LinqDataSource" 
            ItemPlaceholderID="ProductsHolder" 
            OnItemCommand="RadListViewDiscussion_ItemCommand" 
            runat="server" 
            > 
            <LayoutTemplate> 
                <div id="discussion-sort"> 
                    <table  cellpadding="0" cellspacing="0" width="100%;" style="clear: both;"> 
                        <tr> 
                            <td> 
                                Sort by:  
                            </td> 
                            <td> 
                                <asp:LinkButton  
                                    ID="LinkButtonSubject"  
                                    CommandName="Sort" 
                                    CommandArgument="Subject" 
                                    Visible='<%# this.SortSubject %>' 
                                    Font-Bold='<%# this.SelectedSort == DiscussionListWebPart.DefaultSortOption.Subject %>' 
                                    runat="server"  
                                    > 
                                    Subject  
                                    <asp:Image 
                                        ID="ImageSubject" 
                                        Visible='<%# this.SelectedSort == DiscussionListWebPart.DefaultSortOption.Subject %>' 
                                        ImageUrl='<%# this.GetSortDirectionImageUrl() %>' 
                                        runat="server" 
                                        /> 
                                </asp:LinkButton> 
                                <asp:Literal ID="Literal1" 
                                    Text=" | " 
                                    runat="server" 
                                    Visible='<%# this.SortSubject %>' 
                                    > 
                                </asp:Literal> 
                            </td> 
                            <td> 
                                <asp:LinkButton  
                                    ID="LinkButtonBody"  
                                    CommandName="Sort" 
                                    CommandArgument="Body" 
                                    Visible='<%# this.SortBody %>' 
                                    Font-Bold='<%# this.SelectedSort == DiscussionListWebPart.DefaultSortOption.Body %>' 
                                    runat="server"  
                                    > 
                                    Body  
                                    <asp:Image 
                                        ID="ImageBody" 
                                        Visible='<%# this.SelectedSort == DiscussionListWebPart.DefaultSortOption.Body %>' 
                                        ImageUrl='<%# this.GetSortDirectionImageUrl() %>' 
                                        runat="server" 
                                        /> 
                                </asp:LinkButton> 
 
... 

The LinkButton.Visible property does not change, is always true, so that isn't the issue.  It has something to do with the ajax call.  Also, there is a Literal that has a visibility set to the same property.  The Literals don't disappear, but all the LinkButtons that apply sort do.

Is there something else I need to wire up?

Thanks!
Todd
Top achievements
Rank 1
 answered on 06 May 2010
2 answers
124 views
Hi
I have a radgrid which opens a .ascx page to edit or add items. The settings to do this from the grid are copied below. The grid holds appointments. I have a separate aspx page with a radgrid that hols a waitlist. I have been able to code a solution so that when an item in the the waitlist grid is edited to say 'create appointment and close waitlist item', I open the Appointment.aspx page with the grid below. What I have not been able to do is then programatically open the ActivePatientAppointmenControl.ascx page so I can pass details to create a new appointment.  At the moment this has to be done manually. Is there a way I can do this with code?
thx kindly
M

Radgrid settings on Appointment.aspx

 

<MasterTableView CommandItemDisplay="Top" EditMode="PopUp">

 



<

 

EditFormSettings EditFormType="WebUserControl" UserControlName="ActivePatientAppointmentControl.ascx">

 

 

<PopUpSettings Height="420px" Width="700px" Modal="True" ZIndex="2500" />

 

 

</EditFormSettings>

 

Michael Hurse
Top achievements
Rank 1
 answered on 05 May 2010
2 answers
133 views
Short version of what I'm looking for: How do I change the cursor specific to hovering over chart series items?  I've found some documentation to a SeriesDefinition.Appearance property where the cursor can be set, but this does not seem to apply with regards to RadChart for ASP.NET AJAX.

Long version (in case someone can provide a solution or other workaround for the initial issue):

Development began with a previous version of RadControls that seems best compatible with IE7 and thus has remained in this environment.

MAIN ISSUE: In IE7, the cursor automatically defaults to a text cursor in all areas (divs, etc.) where it is not defined.  This is a confirmed bug amongst many others in IE7 as part of the hasLayout issue.  Not a huge deal for some, but I find this quite annoying to see throughout the application.

SOLUTION A: Hack using CSS definition to give all <div> tags a background color of white.  This tricks IE7 into thinking that the <div> tag is defined and has a layout, which in a sense it now does with the white bg.  I was not able to hack with any other property such as others suggested (zoom, position, etc.)

ISSUE A: With the cursor now behaving correctly throughout the entire app (text, hand, default where they should be), there are now some white bgs seen as some of the RadControls use <div> tags and most likely have not explicitly defined a bg.  No problem as I can mostly trace these and override with !important in the app CSS.  The ONLY issue being the RadSplitBar.  When collapse and expand is set to none (so just the vertical bar showing), there's a white bg space about 2 px in height that shows up exactly in the middle where the collapse/expand buttons would normally go.  I've tried overriding all <div> elements associated with the RadSplitter to no avail.

SOLUTION B: Set the cursor to default (which is an arrow) throughout the entire app.  This seems to work pretty well with two exceptions. 1)Have to manually set cursor to text where appropriate and 2)For whatever reason the RadChart Series Item hover no longer changes to a pointer (hand).  Thus we come full circle back to the question above.

I wasn't sure where to post this but as of now thinking solution b is the way to go regardless.  Any help would be greatly appreciated.

Thanks
Panit
treesara
Top achievements
Rank 1
 answered on 05 May 2010
1 answer
114 views
I am using the FormDecorator to format textboxes. Some of the asp textboxes are not visible during the page load. Then when I make them visible, they do not have rounded corners. Is there a way to tell FormDecorator to "redecorate"? I am using RadAjaxManage too.
 

UPDATE:
I just noticed it is only affecting the textboxes that have watermarks... how can I maintain the rounded corners w/ the watermarks?
Chad Canterbury
Top achievements
Rank 1
 answered on 05 May 2010
0 answers
86 views
I've created a ListView on a page that was designed for both desktop and mobile device compatibility.  This all works fine except on Blackberry phones.  We've tested with 3 different Blackberries with the same result.

Inside the the RadListView's LayoutTemplate, I have an asp:LinkButton with these options attached:
    CommandName="Page" CommandArgument="Next"

For some reason on Blackberries, clicking on the resulting "next" button produces an unspecified JavaScript error.  In most cases, these same Blackberries will successfully parse and execute JS code.

Has anyone else had a similar problem to this?
Alan Shepherd
Top achievements
Rank 1
 asked on 05 May 2010
2 answers
204 views
I encountered this space key issue when using textbox in treeview. every time when I hit space key in textbox, the checked node got unchecked and focus is lost. I follow the solution in http://www.telerik.com/community/forums/aspnet-ajax/treeview/radtreeview-control-with-textbox-space-issue.aspx and it doesn't work. Here is my sample code.
  <asp:Panel ID="cbpConditions" runat="server" Width="100%"> 
                 
                 <telerik:RadTreeView ID="t" runat="server" Width="100%" CheckBoxes="True" OnClientNodeChecked="OnClientNodeCheckedEventHandler" 
                                OnClientMouseOver="OnClientMouseOver" OnClientNodeExpanded="NodeExpanded" ExpandDelay="0" MultipleSelect="false"> 
                            </telerik:RadTreeView> 
                            <script type="text/javascript"> 
                                var origOnKeyDown = Telerik.Web.UI.RadTreeView.prototype._onKeyDown; 
 
                                Telerik.Web.UI.RadTreeView.prototype._onKeyDown = function(e) { 
                                    var node = this.get_selectedNode(); 
                                    if (!node) { 
                                        if (e.keyCode == this._upArrowKeyCode || e.keyCode == this._downArrowKeyCode || 
                                            e.keyCode == this._enterKeyCode || e.keyCode == this._spaceKeyCode) { 
                                            this._selectFirstNode(); 
                                            //e.preventDefault();  
                                        } 
                                        return; 
                                    } 
                                    origOnKeyDown.apply(this, arguments); 
                                }  
                            </script>  
                         
                </asp:Panel> 

The textbox is created in code behind instead of using template here.
Sreenivas
Top achievements
Rank 1
 answered on 05 May 2010
2 answers
164 views
Multiple filters works fine if the user sets them from the UI. I can't get more than 1 to work when initializing the filter from my javascript. It is a serious limitation.

I am doing the actual filtering in my web service. I just need for it to pass multiple filter expressions to my select method.

Any ideas?

Thanks,
Joe
Joe
Top achievements
Rank 2
 answered on 05 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?