Telerik Forums
UI for ASP.NET AJAX Forum
32 answers
1.5K+ views
I have the following radnumerictextbox which is behaving oddly

<telerik:RadNumericTextBox ID="txtAmount" runat="server" TabIndex="23" MaxLength="15" 
     DataType="System.Decimal" Width="50px" AllowOutOfRangeAutoCorrect="False" MaxValue="922337203685477" 
     Type="Currency" EmptyMessage="$" style="text-align:right" EnabledStyle-HorizontalAlign="Right"  /> 
 

When the page first loads, the textbox is aligned to the left.  As soon as the mouse enters it, it becomes aligned to the right.  How can I make it align to the right when the page first loads?



Princy
Top achievements
Rank 2
 answered on 12 Feb 2014
2 answers
58 views
I have a problem with RadAjaxLoadingPanel. I'm not able to use it the right way. There is a sample of my code here. LoadingPanel starts work after I'll change skin with SkinManager dropdown. Could anybody help me and tell me what I have to do to make it work without this trick?

My page:

<form id="form1" runat="server">
       <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
       <telerik:RadSkinManager ID="SkinManager1" runat="server" ShowChooser="true" />
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
           <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="Panel1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                   </UpdatedControls>
               </telerik:AjaxSetting>
           </AjaxSettings>
       </telerik:RadAjaxManager>
       <div>
           <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Height="275px" Style="padding-top: 15px; padding-left: 15px">
               <asp:Button ID="Button1" runat="server" Text="Click to see the loading image" OnClick="Button1_Click"></asp:Button>
               treatretae
           </asp:Panel>
       </div>
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
       </telerik:RadAjaxLoadingPanel>
   </form>


Code behind:
namespace TelerikWebApp1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        public void Button1_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(2000);
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
    }
}


Thanks for any help.
KTK
Top achievements
Rank 1
 answered on 12 Feb 2014
20 answers
184 views
We have an app that uses RadAsyncUpload.

If Silverlight isn't installed at all, the the control fails over to the next control type (flash?) before going back to the old school way of doing things.

This is all fine.

If, on the other hand, the user does have Silverlight installed, but it is some version other than Silverlight 5 then the control complains that the wrong version is installed and does nothing.

Now, in the ideal world the user would just update their version of Silverlight and all would be well with the world. Sadly, the users in question are run by IT departments that are only just coming to terms with the fact that there are browsers other than IE6, so upgrading anything is simply a non-starter.

Is there something we can do that will:
  1. use the installed version of Silverlight, where that version is correct (Silverlight 5 only, I assume)
  2. failover to the next available Async upload method where Silverlight is not installed or it is installed but is the wrong version.

I know that I can force the system to believe that Silverlight isn't installed, but I don't want to penalize those users whose IT departments are enlightened enough to have the most recent version installed.

--
Stuart

Peter Filipov
Telerik team
 answered on 12 Feb 2014
4 answers
235 views

Hi

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestPartialPostback.aspx.vb"
    Inherits="Rentware.TestPartialPostback" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <br />
        <telerik:RadFormDecorator ID="rfDecorator" runat="server" DecoratedControls="Buttons,Fieldset,RadioButtons,CheckBoxes" />
        <telerik:RadWindowManager runat="server" ID="radWindowMgr" />
        <telerik:RadAjaxManager ID="radAjaxMgr" runat="server">
            <ajaxsettings>
            <telerik:AjaxSetting AjaxControlID="cbTest">
                <UpdatedControls>                    
                    <telerik:AjaxUpdatedControl ControlID="testPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            </ajaxsettings>
        </telerik:RadAjaxManager>
        <h2>
            Account Management</h2>
        <telerik:RadTabStrip ID="RadTabsAccManage" runat="server" MultiPageID="RadMultiPageAccManage"
            SelectedIndex="0" Skin="WebBlue">
            <tabs>
            <telerik:RadTab Text="General">
            </telerik:RadTab>
            <telerik:RadTab Text="Contacts">
            </telerik:RadTab>
        </tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPageAccManage" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="RadPageViewAccManageGeneral" runat="server">
                <telerik:RadGrid ID="RadGridAccManageMain" runat="server" GridLines="None" AutoGenerateColumns="False"
                    ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
                    AllowAutomaticUpdates="True" DataSourceID="SqlDataSource1">
                    <alternatingitemstyle cssclass="DisplayNone" />
                    <itemstyle cssclass="DisplayNone" />
                    <headerstyle cssclass="DisplayNone" />
                    <footerstyle cssclass="DisplayNone" />
                    <groupingsettings casesensitive="false" />
                    <mastertableview gridlines="None" datasourceid="SqlDataSource1" autogeneratecolumns="false"
                        datakeynames="RegionID">
                    <Columns>
                        <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Center" AllowFiltering="false">
                            <ItemTemplate>
                                   
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>
                            <asp:CheckBox ID="cbTest" runat="server" Text="Enable" TextAlign="Left"
                                OnCheckedChanged="checkBoxCheckedChanaged" AutoPostBack="true" />
                            <asp:Panel ID="testPanel" runat="server" Enabled="false">
                                <fieldset>
                                    <legend>Add Or Edit Region:</legend>Region Description:
                                    <asp:TextBox runat="server" ID="txtText" Text='<%#Bind("RegionDescription") %>' />
                                </fieldset></asp:Panel>
                        </FormTemplate>
                    </EditFormSettings>
                </mastertableview>
                </telerik:RadGrid>
                <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT [RegionID], [RegionDescription] FROM [Region] WHERE ([RegionID] = @RegionID)"
                    runat="server">
                    <SelectParameters>
                        <asp:SessionParameter Name="RegionID" SessionField="regionId" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageViewAccManageContacts" runat="server">
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </div>
    </form>
</body>
</html>
Imports Telerik.Web.UI
Partial Public Class TestPartialPostback
    Inherits System.Web.UI.Page
    Dim regionId As Integer
    Dim commandName As String
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            regionId = Convert.ToInt32(Convert.ToString(Request.QueryString("regionId")))
            Session("regionId") = regionId
        End If
        commandName = IIf(Session("regionId").Equals(0), "PerformInsert", "Update").ToString()
    End Sub
    Private Sub RadGridAccManageMain_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridAccManageMain.ItemCreated
        If TypeOf e.Item Is GridEditableItem AndAlso commandName = "Update" Then
            e.Item.Edit = True
        End If
    End Sub
  
    Protected Sub RadGridAccManageMain_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGridAccManageMain.PreRender
        If Not Page.IsPostBack And commandName = "PerformInsert" Then
            RadGridAccManageMain.MasterTableView.IsItemInserted = True
            RadGridAccManageMain.Rebind()
            'RadGridAccManageMain.MasterTableView.InsertItem()
            RadGridAccManageMain.HeaderStyle.CssClass = "rgEditRow"
        End If
    End Sub
    Protected Sub checkBoxCheckedChanaged(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim thisCheckBox As CheckBox = CType(sender, CheckBox)
        Dim editItem As GridEditFormItem = DirectCast(thisCheckBox.NamingContainer, GridEditFormItem)
  
        CType(editItem.FindControl("testPanel"), Panel).Enabled = thisCheckBox.Checked
    End Sub
End Class

I’m using RadGrid for editing and inserting row in the place of using asp.net form view.  I’m passing the parameter to select the row for editing through query string.I’m assigning that query string to session variable in page load event and that session variable serves as select parameter in SQL Data source.If I get the required query string I’m putting RadGrid in Item Edit Mode and if not It will open the RadGrid in Item Insert mode.Inside Form Template I’ve a checkbox and asp.net panel that wraps all other contents of Form Template. I have an event to handle check box checked status changed.In that event I’m enabling and disabling the panel based on if the checkbox is checked or not.

 

I’ve RadAjaxManager in place with Ajax settings.  I’ve an AJAX setting in that RadAjaxManager with AjaxControlID as ID of the checkbox and AJAX updated control ID as the ID of the panel. So If I check or uncheck the checkbox In either Edit Mode or Insert Mode the panel should be enabled or disabled through AJAX partial post back.

 

Problem/Bug:

If the page loaded in insert mode for the first time and if I check the checkbox it is doing full post back and I can observe that clearly. (This is not expected behaviour).If I check the checkbox again it is doing partial ajaxified post back.But In Edit mode it is working fine (doing partial ajaxified post back) at all time.How I can fix this issue. For your reference I’ve attached the aspx and code behind file for you. It is stopping us from progressing further; your help would be very much appreciated.

Maria Ilieva
Telerik team
 answered on 12 Feb 2014
7 answers
549 views
I have a grid with an attachment column and every time I download an image, the Rad Grid status bar loading image just sits there a spins. Is there a way to hide or better yet, control the loading image?  

Please note, I am NOT referring to a RadAjaxLoadingPanel loading image, I know how to manage that...I am referring to the little spinner in the lower left hand side of the grid that is visible on post back.


Maria Ilieva
Telerik team
 answered on 12 Feb 2014
2 answers
97 views
I've been running Telerik tools and extensions with VS studio for about a year.  I am now upgrading to VS 2012.  What do I need to do to get the extensions with my VS 2012?  We are running on Telerik 2013.2.717.35. 

Thanks
Hunter
Missing User
 answered on 12 Feb 2014
1 answer
292 views
Hi,

Don't hold me to this, but this "may" have started after our recent upgrade to 2013.3.1324.45.

When I enter text and hit the Enter/Return key I get the expected appearance in the Design view, like this:

First line
Second line
Third line

When I subsequently save the record and reopen it, I see:

First lineCHAR(13) + CHAR(10) Second lineCHAR(13) + CHAR(10) Third line

in all 3 modes (Design, HTML and Preview).

Here's the RadEditor declaration.  By the way, we have made some minor changes to the Vista skin, but the problem persists even if I change EnableEmbeddedSkins to "true".

<telerik:RadEditor EnableEmbeddedSkins="false" Skin="Vista" ID="edtAnsRichText" runat="server"<br>                                                    Content='<%# Bind("AnswerText") %>' Width="450px" Height="200px" ToolTip="This is what the user will actually see when they take the questionnaire"><br>                                                    <Tools><br>                                                <telerik:EditorToolGroup Tag="MainToolbar"><br>                                                    <telerik:EditorSplitButton Name="Undo"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSplitButton Name="Redo"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorTool Name="Cut" /><br>                                                    <telerik:EditorTool Name="Copy" /><br>                                                    <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" /><br>                                                    <telerik:EditorTool Name="FormatStripper" /><br>                                                    <telerik:EditorTool Name="PasteStrip" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Formatting"><br>                                                    <telerik:EditorTool Name="Bold" /><br>                                                    <telerik:EditorTool Name="Italic" /><br>                                                    <telerik:EditorTool Name="Underline" /><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorSplitButton Name="ForeColor"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSplitButton Name="BackColor"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorDropDown Name="FontName"><br>                                                    </telerik:EditorDropDown><br>                                                    <telerik:EditorDropDown Name="FontSize"><br>                                                    </telerik:EditorDropDown><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Alignment"><br>                                                    <telerik:EditorTool Name="Indent" /><br>                                                    <telerik:EditorTool Name="Outdent" /><br>                                                    <telerik:EditorTool Name="JustifyLeft" /><br>                                                    <telerik:EditorTool Name="JustifyCenter" /><br>                                                    <telerik:EditorTool Name="JustifyRight" /><br>                                                    <telerik:EditorTool Name="JustifyFull" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Tables"><br>                                                    <telerik:EditorTool Name="InsertTable" /><br>                                                    <telerik:EditorTool Name="ToggleTableBorder" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Lists"><br>                                                    <telerik:EditorTool Name="InsertUnorderedList" /><br>                                                    <telerik:EditorTool Name="InsertOrderedList" /><br>                                                    <telerik:EditorTool Name="InsertHorizontalRule" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="ImagesAndLinks"><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorTool Name="InsertLink" /><br>                                                    <telerik:EditorTool Name="Unlink" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Spell"><br>                                                    <telerik:EditorTool Name="AjaxSpellCheck" /><br>                                                </telerik:EditorToolGroup><br>                                            </Tools><br>                                                </telerik:RadEditor>

Any suggestions on how to debug/resolve this issue?

Thanks in advance.

Jim
Ianko
Telerik team
 answered on 12 Feb 2014
1 answer
88 views
Hi there.

I have a pivot grid showing monthly figures. I also give the user the option to change this to quarterly or annually (updates the GroupInterval attribute).

I need to show % change between months and also between quarters and years when they change the GroupInterval to these intervals.

I was thinking to create a custom sub total to display these % changes. Would that be the best solution? How would I do that?

Thanks.
Antonio Stoilkov
Telerik team
 answered on 12 Feb 2014
1 answer
335 views
hi,
"Sys.InvalidOperationException: Sys.InvalidOperationException: A control is already associated with the element." i have this error on delete button click inside grid.so provide solutions.

my code is:
function deletepermission(id) {
        
          var add = $("#" + "<%=Per_delete.ClientID %>").val();
          if (add == 0) { bootbox.alert("You have no permissions to Update Record");}
          else {
            bootbox.confirm("Are you sure you want to Delete the Record?", function (result) {
                if (result == true) {
                    $("#" + "<%=gridId.ClientID %>").val(id);
                    $("#" + "<%=btn_Delete_actual.ClientID %>").click();
                  }

              });
           }         
      }


<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Action" HeaderText="Action" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>                                                                          
                                                                            <asp:Button runat="server" ID="btnDelete" ToolTip="DeleteRecord"  Text="Delete" onclientclick='<%# Eval("LandlordId","deletepermission({0})") %>' Height="22px"></asp:Button>
                                                                       
                                                                        
                                                                        </ItemTemplate>                                                           
                                                                    </telerik:GridTemplateColumn>


 <asp:Button runat="server" ID="btn_Delete_actual" onclick="btn_Delete_actual_Click" style="display:none;"></asp:Button>                 
 <asp:HiddenField ID="gridId" runat="server"></asp:HiddenField>


serverside code:
protected void btn_Delete_actual_Click(object sender, EventArgs e)
        {
            int lid = Convert.ToInt32(gridId.Value);
            if (lid > 0)
            {
                if (s.DeleteLandlord(lid) == true)
                {
                    msg.Style.Add("display", "block");
                    lbl_msg.Text = "Record Deleted sucsessfully..";
                    lbl_msg.Style.Add("color", "green");
                    GetLandlord();
                }
            }                 
        }

Thanks,
Rahul
Princy
Top achievements
Rank 2
 answered on 12 Feb 2014
1 answer
62 views
Items in combo box is displaying in next line.
Attached snapshot for your reference.
Shinu
Top achievements
Rank 2
 answered on 12 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?