Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
177 views
I have a radTreeView control in a ContentPage.  I am loading the nodes dynamically at runtime.  My MasterPage contains a radAjaxPanel and the ContentPane is contained within the panel, so all of my Content Pages are ajaxified.  This has been working great up until now.

When I click on a node in my radTreeView, the NodeClick event is fired THE FIRST TIME.  If I subsequently click on another node, the event is not fired and I'm getting the following error:

Sys.WebForms.PageRequestManagerServerErrorException:  An unknown error occurred while processing the request to the server.  The status code returned from the server was: 500

I've seen other posts that say to load my nodes using ExpandedMode = TreeNodeExpandedMode.ServerSide, but that didn't seem to do anything.  I saw some other posts that said to add EnablePartialRendering="false" to my radScriptManager.  That fixed the problem, but of course now nothing is ajaxified anymore. 

Then I remembered that on another page in my in my application I have a radUploadFile control.  This doesn't work properly when ajaxified, so I had to disable Ajax for this control.  I decided to do the same thing for my radTreeView and it worked just fine (if you need to see how I did this please let me know).

So, that's where I stand right now.  My radTreeView is not utilizing Ajax, but I'd like it to if I can.  Any idea how to fix this issue?  Again, I have no problems with expanding nodes.  My problem is that the NodeClick event is not firing EXCEPT FOR THE FIRST TIME when ajaxified.

Thanks.

Steve








Deniz
Top achievements
Rank 1
 answered on 22 May 2011
2 answers
92 views
Hi,
I've encountered a ridiculous problem - occuring when using IE only (IE 8; I've not tested other IE versions); NOT occuring when using FireFox, Opera, Chrome or Safari.
My page consists of two UserControls:
<asp:Panel ID="pnlMain" runat="server">
  <uc1:ProcessGridViewEmb ID="embGrid" runat="server" />
  <uc1t:ProcessTreeViewEmb ID="embTree" runat="server" />
</asp:Panel>
There are some scripts loaded above this markup (RadScriptManager; Core.js and jQuery.js of yours plus some my scripts).
embGrid consists of two tabs (RadMultiPage + RadTabStrip); the first of them contains a RadToolBar + RadGrid, the second - a RadToollBar + some minor controls.
embTree consists of a RadToolBar and a RadTreeview.

Let's have a look at embTree (precisely: the RadTreeview inside it). It should look like on tree_ok.jpg (see attached print-screens). But when placed as above it is displayed completely incorrectly: tree_bad.jpg. But - attention - when I change the order of the controls (embTree first, then embGrid), embTree starts to be displayed correctly. Is looks (in the first case) like not all CSS needed for the control has been loaded. I've attached print-screens with the actual markup (I've used the tools from IE 8).

As I've mentioned above all other browser render these control correctly in all the cases.
I'm using Q1 2010 version of Telerik controls.
Is it possible to explain this mystery?

Regards
Tomasz
Tomasz M.Lipiński
Top achievements
Rank 1
 answered on 22 May 2011
0 answers
94 views
Hi,

I'm basically trying to get this to work:

http://blogs.telerik.com/blogs/posts/09-02-25/handling_onajaxrequest_in_content_pages_with_ajax_proxy.aspx

But in a Master/content page situation with ajax settings and with handlers for OnResponseEnd and OnRequestStart.

I must be missing something really obvious, but I can't for the life of me get this to work.  I'm going to paste my code, BUT -- can you all PLEASE post those files to the blog post that are supposed to work?  I have a hard time understanding why this doesn't work when I feel like I've followed all the instructions...

Aspx - Master
    <form id="form1" runat="server">
        <asp:PlaceHolder ID="phValid" runat="server">
<telerik:RadScriptManager ID="rsm" runat="server">  
            <Scripts>
               <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
               <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
               <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
           </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
<div class="pnlCourseMainContentDialog">
        <asp:ContentPlaceHolder id="cphMain" runat="server">
        </asp:ContentPlaceHolder>
    </div>
</asp:PlaceHolder>


Aspx - Content
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
</telerik:RadAjaxManagerProxy>
       
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            window.$ = $telerik.$;
            function get_RadWindow() { var oWindow = null; if (window.radWindow) { oWindow = window.radWindow; } else if ((window.frameElement) && (window.frameElement.radWindow)) { oWindow = window.frameElement.radWindow; } return oWindow; }
            function JustClose() { get_RadWindow().Close(); }
            function fileUploaded(sender, eventArgs) {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest();
            }
 
            function requestStart(sender, eventArgs) {
            }
 
            function responseEnd(sender, eventArgs) {
                var oWnd = get_RadWindow();
                var oArg = new Object();
                oArg.id = $("#<%= hfId.ClientID %>").val();
 
                alert('Id is: ' + oArg.id + " ");
                /*
                //Close the RadWindow and send the argument to the parent page
                if (oWnd)
                    oWnd.close(oArg);
                */
            }
 
            function test() {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest();
            }
 
        </script>
    </telerik:RadCodeBlock>
    <asp:HiddenField ID="hfId" runat="server" />
    <asp:TextBox ID="tbId" runat="server"></asp:TextBox>
    <input type="button" onclick="test()" />



C#
    }
    protected void manager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        //handle the manager AjaxRequest event here
        hfId.Value = "100";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        manager.ClientEvents.OnRequestStart = "requestStart";
        manager.ClientEvents.OnResponseEnd = "responseEnd";
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);
        manager.AjaxSettings.AddAjaxSetting(manager, this.hfId);
}


OH..  I just tried one more thing, I removed the PlaceHolder ID="phValid" and it works now.  I suppose somehow I have a bug in what I'm determining is valid.  Though I'll look dumb keeping this post up, maybe it'll help someone else with similar issues.

Apparently, in my Master Page, the Page_Init call is getting called in the lifecycle somewhere of the ajax call and in that case it's "invalid" by my code logic causing the content area to not be updated correctly...
Chris
Top achievements
Rank 1
 asked on 21 May 2011
4 answers
262 views
Hello,
i have radgrid with grouping on two levels, here is the aspx code:
...
<GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldAlias="Proces" FieldName="Proces" HeaderText="<%$ Resources:StartRes, Lb_Proces %>">
                                        </telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="Proces" SortOrder="Descending"></telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                            <GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldAlias="Postapka" FieldName="Postapka" HeaderText="<%$ Resources:StartRes, Lb_Predmet %>">
                                        </telerik:GridGroupByField>
                                        <telerik:GridGroupByField FieldAlias="BrPRedmet" FieldName="BrPRedmet" HeaderText="<%$ Resources:StartRes, BrPRedmet %>">
                                        </telerik:GridGroupByField>
                                        <telerik:GridGroupByField FieldAlias="DelSubjekt" FieldName="DelSubjekt" HeaderText="<%$ Resources:StartRes, Tv_DSubjekti %>">
                                        </telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="BrPRedmet"  SortOrder="Descending"></telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
...
On Page load i need all group columns to be collapsed, on the first and on the second level. In the code behind i have code to collapse the group columns on the first level. The problem is that i can't access the group columns on the second grouping level. With debugging i found that RadGrid1.MasterTableView.Controls[0].Controls[1].Controls are the  group columns on the second level, but i don't know how to cast them so i can set Expand attribute to false. Here is the code that i use to collapse group columns on first level: 
 
foreach (GridItem item in RadGrid1.MasterTableView.Controls[0].Controls)
                {
                    item.Expanded = false;
}

If i try to access group columns on the second level with GridItem cast 

foreach (GridItem item in RadGrid1.MasterTableView.Controls[0].Controls)
                {
                    item.Expanded = false;
                    foreach (GridItem subitem in item.Controls[1].Controls)
                    {
                        
                    }
                }

 i get the message 

Unable to cast object of type 'Telerik.Web.UI.GridTableHeaderCell' to type 'Telerik.Web.UI.GridItem'.

Please help me how to cast the group columns on the second level so i can collapse them all on Page Load, or tell me some other solution for collapsing group columns. 

Thank you and pardon my English, not that good.
Elena
Top achievements
Rank 1
 answered on 21 May 2011
3 answers
170 views
Hi,

I have following template column i a Radgrid. (using in connection with a product order where a user can choose a number of products.)
            <Columns>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkProduct" runat="server" />
                    </ItemTemplate>
            </Columns>

At the code behind I want to find out which products are choosen by the users (when I save product orders into database), in other words I want to know which are the checkbox's are checked at the save.

I hope someone can help me.

Thanks,
Thaya


Jayesh Goyani
Top achievements
Rank 2
 answered on 21 May 2011
3 answers
50 views
Hi,

I have custom Style listed in Editor Apply CSS class dropdown. These styles are loaded from a style sheet and it works perfect in all browsers except IE and that too in IE all styles are loaded perfectly except one style named "Normal". I am sure there won't be any issues with that style because it is loading in FF and chrome. I am not sure whats going wrong. Can some one help me to load that style in IE also.

Thanks,
Akila.
Akila Kumarasamy
Top achievements
Rank 1
 answered on 21 May 2011
6 answers
188 views
I want to style radspell button. When I try to add the class to the RadSpell control, it doent  apply to the button but rather styles the surrounding areas. Is there a way I can style the radspell button.

thanks
TechSavvySam
Top achievements
Rank 1
 answered on 21 May 2011
1 answer
119 views
referencing your example:

http://demos.telerik.com/aspnet-ajax/listview/examples/definingstructure/declarativedefinition/defaultcs.aspx

you use this bit of markup:

  <LayoutTemplate>
                    <div class="RadListView RadListView_<%#Container.Skin %>">


When I use the exact same code in my page the result renders as:

  <LayoutTemplate>
                    <div class="RadListView RadListView_Default">


Even though the page is using the Sunset skin and buttons are rendering on the page properly with the Sunset skin.

If I hard code this in the page:

  <LayoutTemplate>
                    <div class="RadListView RadListView_Sunset">

It works exactly as I want (but obviously won't work if we change the site's Skin).


TechSavvySam
Top achievements
Rank 1
 answered on 20 May 2011
3 answers
101 views

I have implemented a portal page that allows users to position docks in three zones or float additional docks around the interface.   This allows users with different screen resolutions to make use of their full screen and not be bound to our web portals sizing when having multiple docks on the screen.

To facilitate this I have written a script to ensure that users cannot move floating docks outside of the current screen bounds.  However, the problem I am running into is losing docks when the browser window is resized.   Tapping into a resize event handler for the browser is easy enough but I can’t find a command to cycle through all the open (or just floating) RadDocks to get their current positions so I can reposition them based on the screen resize.

Is there a command similar to cycling through a DockState in C for Java on the client side???

TIA

Gimmik
Top achievements
Rank 1
 answered on 20 May 2011
4 answers
279 views
I have a radgrid inside a user control that disappears when in edit mode or add new mode.   works just fine when the grid is inside an aspx page but when placed inside an ascx, it breaks.  any ideas?
Sergiu
Top achievements
Rank 2
 answered on 20 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?