Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
146 views
I've got an error after update the version to 2008.3.1314.35 release. The error occurs after an ajax request (in bold at the code below) in a java script function that handles the event "OnClientButtonClicked" of a RadToolBar.
The function is

function OnToolbarClicked(sender, args) { 
            var value = args.get_item().get_value(); 
 
            var ajaxManager = GetAjaxManager(); 
 
            var selItemsTmp = GetSelectedItems(); 
               
            alert(selItemsTmp.length);   
                         
            if (value == "Submit") { 
                var selectedItems = GetSelectedDataItem().value; 
                 
                if (selItemsTmp != null && selItemsTmp.length > 0) { 
                    comment = GetComment(); 
                    value = value + "=" + comment; 
                    value = value + ";Items=" + selectedItems; 
                    GetSelectedDataItem().value = ""
                    ShowAlphaDiv();       
                    ajaxManager.ajaxRequest(value); 
                } 
                else { 
                    alert('<%=GetLocalResourceObject("SelectAtLeastOneReport")%>'); 
                } 
            } 
            else if (value == "ShowHistory") {                 
                if (selItemsTmp != null && selItemsTmp.length == 1) { 
                    GetSelectedDataItem().value = ""
                    ShowAlphaDiv();       
                    ajaxManager.ajaxRequest(value); 
                } 
                else { 
                    alert('<%=GetLocalResourceObject("SelectJustOneReport")%>'); 
                } 
            } 
            else { 
                GetSelectedDataItem().value = ""
                ShowAlphaDiv();       
                ajaxManager.ajaxRequest(value); 
            } 
        } 

Additionaly, the page has a "RadDatePicker" control:

<telerik:RadDatePicker ID="radPeriodStart" Height="15px" runat="server" ClientEvents-OnDateSelected="OnDateSelected"  
                                                                                style="margin-top: 0px;"/> 

and an UserControl that has a RadGrid.




The error message (the error message says that an overflow have occurred in an arithmetic operation):

[Exception... "'Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Operação aritmética resultou em um estouro.' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "JS frame :: chrome://firebug/content/spy.js :: onHTTPSpyReadyStateChange :: line 483"  data: no]
http://localhost:1769/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3apt-BR%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2008.3.1314.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3apt-BR%3aef502ffb-86f7-4d96-ad3a-fbb934d602ab%3a16e4e7cd%3aed16cbdc%3a19620875%3a1e771326%3aa7e79140%3a854aa0a7%3a874f8ea2%3a5a6d9d23%3a8674cba1%3ab7778d6c%3ac08e9f8a%3aa51ee93e%3a59462f1%3aaa288e2d%3a58366029
Line 6

P.S.: The error wasn't occurring in previous version.

Best regards,

Gilvan Calou
Pavel
Telerik team
 answered on 28 Jan 2009
2 answers
395 views
Hi folks:

I'm looking for the following help file (http://www.telerik.com/DEMOS/ASPNET/Prometheus/Controls/Examples/Integration/GridAndInput/DefaultCS.aspx?product=grid) to learn how to do subtotals by group (in a group footer) with RadGrid, but I get a 404 error... can anyone help me out with the new location?  Even better, perhaps an example of how to:
 Show a Grouping Footer
 Sub-total a column in that Grouping Footer
 Total or average a column for the 'entire' grid (in the grid footer) while excluding the grouping subtotals (or using only the subtotals)

Very much appreciated,
Chrysa
Chrysa
Top achievements
Rank 1
 answered on 28 Jan 2009
4 answers
191 views
Hi,

I am having a senior moment or something like that -  Following is the partial grid code used to display a ClientCost field. The data coming back from database is 0.00. It has rendered it as if someone has used a eraser in the place where 0.00 should be displayed. If I remove DataFormatString and FooterAggregateFormatString then everything looks fine.

Could you please let me know why it is happening?

<telerik:GridBoundColumn DataField="ClientCost" HeaderText="Net Cost" Aggregate="Sum"  DataFormatString="{0:###,###.##}"   FooterAggregateFormatString="&lt;strong&gt;{0:###,###.##}&lt;/strong&gt;"  UniqueName="ClientCost" Groupable="False"></telerik:GridBoundColumn>

Thanks a lot.

Milan G
Milan Gurung
Top achievements
Rank 1
 answered on 28 Jan 2009
3 answers
136 views
I have a page that contains an instance of the scheduler.  Various links/buttons on the page will cause the scheduler to reload the given appoinments.

Each time the scheduler reloads I want to display the AjaxLoadingPanel over the scheduler control.

I have this working the for an asp:LinkButton on the page but I cannot seem to wire up a RadRotator to the scheduler/AjaxLoadingPanel


Following is code that works:
                <telerik:AjaxSetting AjaxControlID="panelShowAll">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="ShowAll" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                    <table cellpadding="1" cellspacing="1">  
                        <tr> 
                            <td align="center">  
                                <asp:Label ID="lblPropertyTitle" runat="server" Font-Bold="true"></asp:Label> 
                                <asp:Panel ID="panelShowAll" runat="server">  
                                    <asp:LinkButton runat="server" ID="ShowAll" OnClick="ShowAll_Click" Text="(Show All Open Houses)" /> 
                                </asp:Panel> 
                            </td> 
                        </tr> 
                    </table> 

But this does not work:
                <telerik:AjaxSetting AjaxControlID="propertyRotator">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                                <asp:Panel runat="server" ID="PropertiesPanel" HorizontalAlign="Center">  
                                    <table cellpadding="0" cellspacing="0">  
                                        <tr> 
                                            <td valign="middle">  
                                                <button onclick="$find('<%=propertyRotator.ClientID%>').showNext(Telerik.Web.UI.RotatorScrollDirection.Left);" 
                                                    type="button" class="left">  
                                                </button> 
                                            </td> 
                                            <td valign="middle">  
                                                <telerik:RadRotator ID="propertyRotator" runat="server" Width="300px" Height="250px" ItemHeight="230px" ItemWidth="300px" RotatorType=FromCode  ScrollDuration="350" 
                                                    OnItemClick="propertyRotator_ItemClick" OnItemDataBound="propertyRotator_ItemDataBound"   > 
                                                    <ItemTemplate> 
                                                        <asp:Panel runat="server" ID="ThumbnailPanel" CssClass='<%# "rsThumbnail ID" + Eval("propertyID") %>' HorizontalAlign="Center">  
                                                            <asp:LinkButton runat="server" ID="LinkButton1" CommandName="DisplayPropertySchedule" CommandArgument='<%# Eval("propertyID") %>' 
                                                                ToolTip='<%# Eval("title") %>'>  
                                                                <asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("url") %>' 
                                                                AlternateText='<%# Eval("title") %>'/>  
                                                            </asp:LinkButton> 
                                                            <asp:LinkButton runat="server" ID="btnPropertySchedule" Text='<%# Eval("title") %>' CommandName="DisplayPropertySchedule" CommandArgument='<%# Eval("propertyID") %>' /> 
                                                            <asp:HiddenField ID="hiddenPropertyId" runat="server" Value='<%# Eval("propertyID") %>' /> 
                                                        </asp:Panel> 
                                                    </ItemTemplate> 
                                                </telerik:RadRotator> 
                                            </td> 
                                            <td valign="middle">  
                                                <button onclick="$find('<%=propertyRotator.ClientID%>').showNext(Telerik.Web.UI.RotatorScrollDirection.Right);" 
                                                    type="button" class="right">  
                                                </button> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </asp:Panel> 

Anyone have any ideas?

Thanks.
Fiko
Telerik team
 answered on 28 Jan 2009
6 answers
238 views
Hi

I am using the bellow code in my user control but iam alway geting the this.ClientID =undifined
and this.MasterTableView.SelectedRows=null

what i need to chage this code?
<
script type="text/javascript">
       
function GridCreated()
       {
           //gets the main table scrollArea HTLM element  
           var scrollArea = document.getElementById(this.ClientID + "_GridData");  
           var row = this.MasterTableView.SelectedRows[0];
             
           //if the position of the selected row is below the viewable grid area  
           if((row.Control.offsetTop - scrollArea.scrollTop) + row.Control.offsetHeight + 20 > scrollArea.offsetHeight)  
           {  
               //scroll down to selected row  
               scrollArea.scrollTop = scrollArea.scrollTop + ((row.Control.offsetTop - scrollArea.scrollTop) + row.Control.offsetHeight - scrollArea.offsetHeight) + row.Control.offsetHeight;  
           }  
           //if the position of the the selected row is above the viewable grid area  
           else if((row.Control.offsetTop - scrollArea.scrollTop)
< 0)  
           {  
               
//scroll the selected row to the top  
               scrollArea.
scrollTop = row.Control.offsetTop;  
           }  
       }
<
/script>

Thanks
Vairam
vairam
Top achievements
Rank 1
 answered on 28 Jan 2009
2 answers
120 views
Hi,

Your Menu is ace, and have just implemented a Web Service driven menu which also respects my cookie so can onyl display menu items that the user is allowed to see.

But can I take this further and instead of using a conventional .asmx service, use a basic WS bound WCF service?

Nathan J Pledger
Top achievements
Rank 2
 answered on 28 Jan 2009
3 answers
119 views
I've been using the DynamicRadGrid code referenced in the blog (link) and other posts (link) in the forum, and I finally got it working with my project (seems only to work in Website projects, not Web Application projects - complains about "dynamic" tag prefix)

Now, I'm having issues with the Export functionality, where the following code only displays a blank grid and no download popup.

  protected void btnExport_Click(object sender, EventArgs e)  
  {  
     GridView1.ExportSettings.IgnorePaging = true;  
     GridView1.ExportSettings.OpenInNewWindow = true;  
     GridView1.ExportSettings.ExportOnlyData = true;  
     GridView1.MasterTableView.ExportToExcel();  
  } 

Help!
Nikolay Rusev
Telerik team
 answered on 28 Jan 2009
1 answer
143 views
Hi,
I have a Master page in my application which contains RadAjaxManager. One of the page that uses base page has two user controls. And both the user controls have RadAjaxManagerProxy. both the userControls have different javascript methods that use:-

var ajaxManager =  $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
ajaxManager.ajaxRequest("ARGUMENTS");

and in the Page_Load of both the userControls ajaxRequest is wired to different events, like in userCtrl_1
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManagerUC_Ctrl_1);
    }
and in userCtrl2 pageLoad is something like this:-
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManagerUC_Ctrl_2);
    }

My problem is when I use both the user controls in the same page. and say userCtrl_1 fires its client side ajaxRequest the apart from execution of RadAjaxManagerUC_Ctrl_1, the second method RadAjaxManagerUC_Ctrl_2 also gets executed. Even though userControl_2 did not do anything.


Dimo
Telerik team
 answered on 28 Jan 2009
1 answer
146 views
I am building a small web site in which I was hoping to put a scrolling bar at the top using the rotator.
It would scroll from right to left thru all the registered users on the site.

however I notice that since I have defined a simple template in the rotetor, the rotator renders the entire template FOR EACH AND EVERY USER right in the page.

It seems to me that this couold get ugly if me site would get any popularity as this would render that same template each time

1 million users = 1 million template ( times ? number of bytes)

is there another way of doing this? AJAX perhaps?


this is what it renders foir each user:
<li class="radr_item" style="height:75px;"><div id="ctl00_UserProfilePhotoStrip1_RadRotator1_i22">
        
               
          
                
                      <div id="ctl00_UserProfilePhotoStrip1_RadRotator1_i22_panAvatar" class="UserPhotoStripPan" style="background-color:#CC66FF;border-color:#00CC00;border-width:2px;border-style:Outset;height:66px;width:90px;">
         
                        
                          <div id="ctl00_UserProfilePhotoStrip1_RadRotator1_i22_Panel4">
          
                       
                    
                       <small><span id="ctl00_UserProfilePhotoStrip1_RadRotator1_i22_Label1" class="UserPhotoStripUserName" style="font-size:XX-Small;font-weight:bold;">SampleEditor</span></small>
                          
         </div>
                          <div id="ctl00_UserProfilePhotoStrip1_RadRotator1_i22_Panel2">
          
                         
               <table border="0" cellpadding="0" cellspacing="0" class="photo-frame">
                                    <tr>
                                        <td class="topx--"></td>
                                        <td class="top-x-"></td>
                                        <td class="top--x"></td>
                                    </tr>
                                    <tr>
                                        <td class="midx--"></td>
                                        <td>
                                            <img id="ctl00_UserProfilePhotoStrip1_RadRotator1_i22_Image1" src="images/ProfilePictures/SampleEditor/OriginalPic/cutie.jpg" style="width:25px;border-width:0px;" />
                                         <td class="mid--x"></td>
                                    </tr>
                                    <tr>
                                        <td class="botx--"></td>
                                        <td class="bot-x-"></td>
                                        <td class="bot--x"></td>
                                    </tr>
                                </table>
                               
         </div>
                              
             
        </div>
                 
       </div></li>
Fiko
Telerik team
 answered on 28 Jan 2009
1 answer
82 views
Hello,
I am working in full code behind, I want to ajaxify one node of my Treeview on a Timer tick.
I do not know, how can I do with the AddAjaxSetting method.

RadAjaxManager1.AjaxSettings.AddAjaxSetting(Timer1, ???);

This method need a Control for the 2nd  parameter, I have tried to put the RadTreeNode but it does not work (javascript error)!

regards

Atanas Korchev
Telerik team
 answered on 28 Jan 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?