Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
140 views
Hi,

When i use a RadAjaxManager (Rad Controls for asp.NET), and click an ajaxified button, all controls in the current page are being rendered. Even the button is just controls a label on the page. My menus on  master page, asp panels etc.. Not surprisingly it takes very long time, my page to be load. (1.5 seconds for an ajax request) . Please read the last post of Mr. Vlad at http://www.telerik.com/community/forums/thread/b311D-mhkbe.aspx

Asp.NET AJAX not working like telerik AJAX. First of all, MS AJAX doesn't render whole page after an ajax request. Just updated update panels.

And my question is: As i see, the definition of prometheus in asp pages is different from rad asp.net, similar to MS AJAX definition. It brings script manager and proxy. I didn't test it. But i wonder that: is Prometheus rendering just updated panels for ajax calls?

Kind Regards,
Caglar Ozkul
Steve
Telerik team
 answered on 04 Feb 2008
1 answer
112 views
I'm adding the AjaxToolkit ValidatorCallout to the page dynamically inside of the RadAjaxPanel.  Currently it doesn't display, but if I put it inside of an UpdatePanel instead it does work.  Is there a way to have the ValidatorCallout to show inside of the RadAjaxPanel?

Thank you.
Sebastian
Telerik team
 answered on 04 Feb 2008
3 answers
105 views
Just updated my code to your latest update and things really fly now!  I had a bunch of problems around drag and drop which are now fixed.  The usability of the controls has also gotten significantly better.

Thanks for all the hard work.  I really appreciate it.
Nikolay
Telerik team
 answered on 04 Feb 2008
1 answer
150 views
Hi

I am setting my ComboBox Text attribute in code behind, however, it does not seem to be updating the control.

i.e. ComboBox.Text = "Test" does not update control on web page.

I ahve set AllowCustomText="true".

Any ideas ?

Kind Regards

David
Veselin Vasilev
Telerik team
 answered on 04 Feb 2008
2 answers
295 views

Getting this error, have everything setup just like in demo:

Value does not fall within the expected range.

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.ArgumentException: Value does not fall within the expected range.

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:

[ArgumentException: Value does not fall within the expected range.]
   System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
   System.Web.Util.Misc.ThrowIfFailedHr(Int32 hresult) +3970782
   System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size) +74
   Telerik.Web.UI.Upload.RequestStream.ReadEntityBody(Byte[] buffer, Int32 offset, Int32 count) +81
   Telerik.Web.UI.Upload.RequestStream.Read(Byte[] buffer, Int32 offset, Int32 count) +131
   Telerik.Web.UI.Upload.RequestParser.InitBuffer() +51
   Telerik.Web.UI.Upload.RequestParser.ProcessRequest(RequestStream request) +31
   Telerik.Web.UI.RadUploadHttpModule.Context_BeginRequest(Object sender, EventArgs e) +561
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +177


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Petya
Telerik team
 answered on 04 Feb 2008
1 answer
220 views
Hi,

I have a regular validation control inside a tooltip.

What I like to do is only show the tooltip when there is a message in the validation control. I have  added this method on OnClientBeforeShow event of the tooltip

        function CheckIfShow(sender, args) 
        { 
            var summaryElem = document.getElementById("rfvFirstName"); 
              
            //check if summary is visible 
            if (summaryElem.style.display == "none") 
            { 
                //API: if there are no errors, do not show the tooltip 
                var tooltip = $find("<%= RadToolTip1.ID %>"); 
                tooltip.hide(); 
            } 
        } 

or per one of your samples

            //check if summary is visible 
            if (summaryElem.style.display == "none") 
            { 
                //API: if there are no errors, do not show the tooltip 
                args.set_cancel(true); 
            } 

but neither of this works. The tooltip pops up with empty content when I enter the text box.

any suggestions?


Svetlina Anati
Telerik team
 answered on 04 Feb 2008
5 answers
219 views
why cant i place the clientside ajax request in the form tags ?

        <telerik:RadAjaxLoadingPanel ID="ajaxLoader" runat="server" Height="75px" Width="75px" 
            Transparency="5">  
            <img alt="Loading..." src="RadControls/Ajax/Skins/Default/loading7.gif" 
                style="border: 0px;" /> 
        </telerik:RadAjaxLoadingPanel> 
        <script language="javascript" type="text/javascript">     
        function gotoPage(CallDesc)  
        {             
                var ajax = <%= ajaxMan.ClientID %>;  
                ajax.AjaxRequest(CallDesc);  
                       
        }        
    </script> 
          
    </form> 
why does the The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).  error occur?

i know if you replace the <%=  with <%# the code runs but does not return the control id;

now if i put this outside of the form block an call the gotoPage() method in the bofy tag  <body onload="gotoPage('ActivateJavasciptLayer')"> ; it says that object or method not supported (refering to AjaxRequest), but if the page completely load then if i call this method it works ? this problem occured after upgraded to the latest Q3 2007 version.

If you could mabe provide a workaround i would greatly appriciate it
thank you
Stuart
Top achievements
Rank 1
 answered on 04 Feb 2008
1 answer
87 views
Hi, I'm new to the Docking controls but I was wondering if it is possible to overload the DockState with some more data that is specific to layout of my application.

It would be great if the existing architecture of loading/saving DockLayout could be used to load/save other info like parameters that need to be passed to a control inside the Dock.

So, for instance, if a user selects a date in a calendar that exist inside the RadDock, can I add it to the DockState so that on postback it is remembered and the date is selected next time it loads?

Thanks,
Lina
Petya
Telerik team
 answered on 04 Feb 2008
1 answer
141 views
When I use the black Skin for the RadWindow in Prometheus, the progress spinner displays on the bottom bar like 20 times..Probably need to set background no-repeat.

Also I have two windows on a page..The first one is set to display on page load and it shows up centered on the page. On this window, I have a link that opens up another rad window, but it ends up not being centered. I'm not sure why.
Georgi Tunev
Telerik team
 answered on 04 Feb 2008
3 answers
547 views
I'm in the process of converting my Componentart grid to Telerik and I encountered this VERY bizarre behavior.

Clicking on any of the command buttons (add a record, edit, refresh) causes the following error:

Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

Here's the weird part...it doesn't do it every time. I can sit on the same page and click the add a record button 20 times and get that error, but on the 21st click, it will work. Same with the edit button...click it 10 times or so and get that error, but the next click and it goes into edit mode.

I've been scratching my head for the last hour and I can't seem to figure it out.

Here's my code...very basic since I'm still converting

                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                    <AjaxSettings> 
                        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                    </AjaxSettings> 
                </telerik:RadAjaxManager> 
                <telerik:RadGrid ID="RadGrid1" Skin="Default2006" 
                    Width="160" 
                    AllowSorting="True" 
                    PageSize="10" 
                    ShowFooter="True" 
                    AllowPaging="True" 
                    OnNeedDataSource="RadGrid1_NeedDataSource" 
                    OnInsertCommand="RadGrid1_InsertCommand" 
                    OnDeleteCommand="RadGrid1_DeleteCommand" 
                    OnUpdateCommand="RadGrid1_UpdateCommand" 
                    Gridlines="Both"   
                    runat="server">  
                    <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="den_id" Width="100%" HorizontalAlign="NotSet" AutoGenerateColumns="False">  
                        <Columns> 
                            <telerik:GridBoundColumn UniqueName="den_id" DataField="den_id" Visible="false" /> 
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">  
                                <ItemStyle Width="85" /> 
                            </telerik:GridEditCommandColumn> 
                            <telerik:GridBoundColumn DataField="den_no" HeaderText="Den" UniqueName="den_no">  
                                <ItemStyle Width="50" /> 
                            </telerik:GridBoundColumn>   
                            <telerik:GridDropDownColumn UniqueName="den_type_id" DataSourceID="DenTypeDataSource" ListValueField ="den_type_id" ListTextField="den_type_nm" HeaderText="Den Type" DataField="den_type_id">  
                                <ItemStyle Width="100" /> 
                            </telerik:GridDropDownColumn>   
                            <telerik:GridBoundColumn DataField="den_nm" HeaderText="Den Name" UniqueName="den_nm">  
                                <ItemStyle Width="150" /> 
                            </telerik:GridBoundColumn>   
                            <telerik:GridDropDownColumn UniqueName="den_ldr_id" DataSourceID="DenLeaderDataSource" ListValueField ="adult_id" ListTextField="adult_nm" HeaderText="Den Leader" DataField="den_ldr_id">  
                                <ItemStyle Width="100" /> 
                            </telerik:GridDropDownColumn> 
                            <telerik:GridButtonColumn UniqueName="DeleteColumn" ConfirmText="Delete Den?" ButtonType="ImageButton" CommandName="Delete" > 
                                <ItemStyle Width="30" /> 
                            </telerik:GridButtonColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <PagerStyle Mode="NextPrevAndNumeric" /> 
                </telerik:RadGrid> 
                <asp:SqlDataSource ID="DenTypeDataSource" runat="server" /> 
                <asp:SqlDataSource ID="DenLeaderDataSource" runat="server" /> 

here's the code-behind
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        PageTitle.InnerText = "Scout Central-Manage Dens" 
        DenTypeDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString  
        DenTypeDataSource.SelectCommand = "SELECT [sc_den_type].[den_type_id], [sc_den_type].[den_type_nm] FROM [sc_den_type] WHERE [sc_den_type].[unit_type_id] = " & Profile.UnitTypeID + " ORDER BY [sc_den_type].[den_type_id] ASC"  
        DenLeaderDataSource.ConnectionString = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString  
        DenLeaderDataSource.SelectCommand = "SELECT [sc_adult].[adult_id], [sc_adult].[adult_fnm] + ' ' + [sc_adult].[adult_lnm] AS [adult_nm] FROM [sc_adult] WHERE [sc_adult].[unit_id] = " & Profile.UnitID  
    End Sub  
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource  
        RadGrid1.DataSource = GetDataTable("SELECT [sc_den].[den_id], [sc_den].[den_no], [sc_den].[den_type_id], [sc_den].[den_nm], [sc_den].[den_ldr_id] FROM [sc_den] WHERE [sc_den].[unit_id]=" & Profile.UnitID & " ORDER BY [sc_den].[den_no] ASC")  
    End Sub  
 
    Public Function GetDataTable(ByVal query As String) As DataTable  
        Dim connstr = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString  
        Dim dbconn As New SqlConnection(connstr)  
        Dim dbadapter As New SqlDataAdapter(query, dbconn)  
        Dim oTable1 As New DataTable("Dens")  
        Try  
            dbadapter.Fill(oTable1)  
        Finally  
            dbconn.Close()  
        End Try  
        Return oTable1  
    End Function  
 
    Protected Sub RadGrid1_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)  
        'Get the GridEditFormInsertItem of the RadGrid  
        Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)  
 
        Dim sql As String = "" 
        Dim den_no As String = (TryCast(item("den_no").Controls(0), TextBox)).Text  
        Dim den_type_id As String = (TryCast(item("den_type_id").Controls(0), RadComboBox)).SelectedItem.Value  
        Dim den_nm As String = (TryCast(item("den_nm").Controls(0), TextBox)).Text  
        Dim den_ldr_id As String = (TryCast(item("den_ldr_id").Controls(0), RadComboBox)).SelectedItem.Value  
 
        sql = "INSERT INTO [sc_den] ([unit_id], [den_type_id], [den_no], [den_nm], [den_ldr_id]) VALUES (" 
        sql += Profile.UnitID + ", "  
        sql += "'" + den_type_id + "', "  
        sql += "'" + den_no + "', "  
        sql += "'" + den_nm + "', "  
        sql += "'" + den_ldr_id + "') "  
 
        Try  
            Dim connstr = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString  
            Dim dbconn As New SqlConnection(connstr)  
            dbconn.Open()  
            Dim cmd As New SqlCommand(sql, dbconn)  
            cmd.ExecuteNonQuery()  
            dbconn.Close()  
        Catch ex As Exception  
            RadGrid1.Controls.Add(New LiteralControl("Unable to add Den. Reason: " + ex.Message))  
            e.Canceled = True 
        End Try  
 
    End Sub  
 
    Protected Sub RadGrid1_DeleteCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)  
        'Get the GridDataItem of the RadGrid  
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)  
 
        'Get the primary key value using the DataKeyValue.  
        Dim sql As String = "" 
        Dim den_id As String = item.OwnerTableView.DataKeyValues(item.ItemIndex)("den_id").ToString()  
        sql = "DELETE FROM [sc_den] WHERE [den_id]=" + den_id + " "  
 
        Try  
            Dim connstr = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString  
            Dim dbconn As New SqlConnection(connstr)  
            dbconn.Open()  
            Dim cmd As New SqlCommand(sql, dbconn)  
            cmd.ExecuteNonQuery()  
            dbconn.Close()  
        Catch ex As Exception  
            RadGrid1.Controls.Add(New LiteralControl("Unable to delete Den. Reason: " + ex.Message))  
            e.Canceled = True 
        End Try  
 
    End Sub  
 
    Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)  
        'Get the GridEditableItem of the RadGrid  
        Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem)  
 
        'Get the primary key value using the DataKeyValue.  
        Dim sql As String = "" 
        Dim den_id As String = item.OwnerTableView.DataKeyValues(item.ItemIndex)("den_id").ToString()  
        Dim den_no As String = (TryCast(item("den_no").Controls(0), TextBox)).Text  
        Dim den_type_id As String = (TryCast(item("den_type_id").Controls(0), RadComboBox)).SelectedItem.Value  
        Dim den_nm As String = (TryCast(item("den_nm").Controls(0), TextBox)).Text  
        Dim den_ldr_id As String = (TryCast(item("den_ldr_id").Controls(0), RadComboBox)).SelectedItem.Value  
        sql = "UPDATE [sc_den] SET " 
        sql += "[den_no]='" + den_no + "', "  
        sql += "[den_type_id]='" + den_type_id + "', "  
        sql += "[den_nm]='" + den_nm + "', "  
        sql += "[den_ldr_id]='" + den_ldr_id + "' "  
        sql += "WHERE [den_id]=" + den_id + " "  
 
        Try  
            Dim connstr = ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString  
            Dim dbconn As New SqlConnection(connstr)  
            dbconn.Open()  
            Dim cmd As New SqlCommand(sql, dbconn)  
            cmd.ExecuteNonQuery()  
            dbconn.Close()  
        Catch ex As Exception  
            RadGrid1.Controls.Add(New LiteralControl("Unable to update Den. Reason: " + ex.Message))  
            e.Canceled = True 
        End Try  
 
    End Sub 

Any ideas on what could be causing this strange behavior?
Philip
Top achievements
Rank 1
 answered on 04 Feb 2008
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?