Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
145 views
I've got a radEditor in a popup edit form template for a radGrid. I've set the editor's size like this:
<telerik:RadEditor ID="reItemText" Runat="server" Width="800" Height="300" AutoResizeHeight="false" EnableResize="false" ToolsWidth="800" ContentAreaMode="Div" Skin="WebBlue" Content='<%# DataBinder.Eval(Container, "DataItem.ItemText") %>'>
</telerik:RadEditor>

I've set the external style sheets in my master page like this (I did because the editor was initially coming up about 1000px wide!):
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server">
   <StyleSheets>
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css" />
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" />
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css" />
   </StyleSheets>
</telerik:RadStyleSheetManager>

The editor size is set exactly as I specified, but instead of the actual editing area being resized, I've got a bunch of empty space at the BOTTOM of the editor (see the attached image).

How can I get rid of the useless space at the bottom of the editor and make the editable area larger?

The screenshot is from IE 9. I'm using radControls for ASP.NET Ajax Q1 2012.

Rumen
Telerik team
 answered on 29 Oct 2012
4 answers
273 views
I've got a radEditor in a popup form template of a radGrid as follows:
<EditFormSettings EditFormType="Template" CaptionFormatString="Edit News Item" >
  <PopUpSettings Height="500" Width="900" Modal="true" CloseButtonToolTip="Close" ScrollBars="Auto"/>
  <EditColumn></EditColumn>
  <FormTemplate>
    <table width="100%" border="0" cellpadding="0" cellspacing="6">
      <tr>
        <td valign="top"><b>Title:</b></td>
        <td valign="top">
          <telerik:RadTextBox ID="rtbTItle" runat="server" Width="400" TextMode="SingleLine" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>' Skin="WebBlue">
          </telerik:RadTextBox>
        </td>
      </tr>
      <tr>
        <td colspan="2" valign="top" style="">
          <b>Item Text:</b><br />
          <telerik:RadEditor ID="reItemText" runat="server" OnClientLoad="reItemText_OnClientLoad" OnClientModeChange="reItemText_OnClientModeChange" Width="800" Height="300" AutoResizeHeight="false" EnableResize="false" ToolsWidth="800" ContentAreaMode="Div" Skin="WebBlue" Content='<%# DataBinder.Eval(Container, "DataItem.ItemText") %>'>
          </telerik:RadEditor>
        </td>
      </tr>
    </table>
  </FormTemplate>
</EditFormSettings>

Because of initial size problems I've included the external style sheet files as recommended in another forum post like this:
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server">
  <StyleSheets>
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css" />
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" />
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css" />
  </StyleSheets>
</telerik:RadStyleSheetManager>

I've also got an OnClientLoad handler to set the size of the radEditor like this:
function reItemText_OnClientLoad(sender,args){
  sender.setSize( 800, 300 );
  var oElem = sender.get_element( );
  oElem.style.height = "300px";
  oElem.style.width = "800px";
}

This all works beautifully, until  you change the radEditor mode. Then the size of the radEditor changes. How it changes seems to depend on which order you change modes in, but it never does return to the size I originally set it to.

Here are two examples. I've attached screen captures showing the problem using Iconico's Screen Calipers to measure the size of the radEditor.

Example 1:
Initial size in Design mode - 300px (A1 Design.png)
Change to Preview mode - 294px (A2 Preview.png)
Change to HTML mode - 294px (A3 HTML.png)
Change to Design mode - 294px (A4 Design.png)
Change t HTML mode - 330px (A5 HTML.png)

Example 2:
Initial size in Design mode - 300px (B1 Design.png)
Change to HTML mode - 330px (B2 HTML.png)
Change to Preview mode - 324px (B3 Preview.png)
Change to HTML mode - 318px (B4 HTML.png)
Change to Design mode - 324px (B5 Design.png)

I tried adding an OnClientModeChange event handler to the radGrid to reset the size again (code identical to OnClientLoad handler) but that had no effect.
Rumen
Telerik team
 answered on 29 Oct 2012
1 answer
94 views
Hi,

I have a tree view control that loads on demand. When i click on one of the nodes, there is an ajax operation that fetches data from server side and populates child nodes for this tree view control. I am getting a "Stop running script" prompt when i attempt to expand the node. I tried the suggestions as per the link below:

http://www.telerik.com/help/aspnet-ajax/treeview-troubleshooting-treeview-script-causes-ie-run-slowly.html

Unfortunately this does not work, please suggest on how do i overcome this issue.

Thanks and regards,
Damodar
Plamen
Telerik team
 answered on 29 Oct 2012
1 answer
209 views
Can a RadGrid be setup to automatically scroll using jquery/javascript?  I have a requirement to display data but I need the data to continously scroll in a loop without user interaction. 

TIA
Eyup
Telerik team
 answered on 29 Oct 2012
1 answer
153 views
Hi,

I need to generate custom XML from RadTreeList control. Can you please help me how can I traverse the TreeList. 

Thanks
Marin
Telerik team
 answered on 29 Oct 2012
3 answers
194 views
I have a 4.0 RadGrid on my page that I'm trying to bind to a LinqDataSource.  I originally tried to bind the grid to a LinqDataSource that had a detailed select statement that included crossreferences to foreign keys.  This did not work when it came to updates. 

2 questions.

1.  Do I understand correctly?  The only way I can get Linq to automatically take care of updates is to not have a Select statement in my LinqDataSource.

2. If (1) is correct then am I also correct in assuming that if I want cross-references to other tables I need to manually code them in the <Grid name>_ItemDataBound event?
Daniel
Telerik team
 answered on 29 Oct 2012
1 answer
179 views
Hi,

We are currently using Visual Studio 2005 for our ASP.NET web site. We bought telerik .NET 2.0 dlls and used them in the web site.

Now, we want to upgrade to Visual Studio 2012. If we buy telerik .NET 4.5 dlls, would it work or do we have to do some manual code changes? 

Also, Is there is a converter or tool that can help us with?

Thanks.
Genady Sergeev
Telerik team
 answered on 29 Oct 2012
1 answer
222 views
Hi,

How to add, update and delete on radgrid? My Add and update form should be in modal popup window in the same page of the grid where i should able to design the form.

I was implemented the samething in two pages one is grid page and another for new and edit.

Suggest to do it in single page


Thanks,
Prathap
Shinu
Top achievements
Rank 2
 answered on 29 Oct 2012
1 answer
129 views
I'm trying to do a database lookup based on what the user selects from the radcombobox.  The SelectedIndexChanged event isn't firing. Well, actually, it does fire but I'm not seeing the result of the postback (textbox.text = result) until I change a different field on the form (RadTextBox field). When I change the value of that field the TextChanged event runs and does what it's supposed to and I can then see the result of the SelectedIndexChange event from the combobox.


MARKUP
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="reg.aspx.vb" Inherits="TelerikWebForm" MasterPageFile="~/masterpage.master" maintainScrollPositionOnPostback = "true" %>
<asp:Content id="content1" ContentPlaceHolderID="cph_content" runat="server">
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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>
 
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Web20">
    </telerik:RadSkinManager>
    <div id="main">
        <div id="content">
        
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="680px" LoadingPanelID="RadAjaxLoadingPanel1">
            <!--COMPANY / ISSUE-->
            <telerik:RadComboBox ID="RadComboBox1"
                Label="Name of Stock: "
                runat="server"
                Width="300px"
                LabelWidth="133px" 
                Height="150px"
                EmptyMessage="Enter Name of Company whose stock you own"
                DataSourceID="sqldatasource1"
                DataTextField="coname"
                DataValueField="issuenum"
                EnableAutomaticLoadOnDemand="True"
                ShowMoreResultsBox="true"
                EnableVirtualScrolling="True"
                OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"
                AllowCustomText="false"
                LoadingMessage="Searching..."
                MinFilterLength="0"
                AutoPostBack="true">
                </telerik:RadComboBox>
             
                <asp:Label ID="lblConameLookup" runat="server" Text=" " Width="275" CssClass="label1" Visible="true"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="Name of Stock is required." ControlToValidate="RadComboBox1" CssClass="label1error"></asp:RequiredFieldValidator>
                 
                <asp:SqlDataSource ID="SqlDataSource1" runat="server"  ConnectionString="..."></asp:SqlDataSource>
            <br />
 
             
            <!--USERNAME-->
            <telerik:RadTextBox ID="txtUsername" runat="server" Label="Username:" EmptyMessage="30 character max" MaxLength="30" LabelWidth="130" Width="300" OnTextChanged="txtUsername_TextChanged" AutoPostBack="true">
            </telerik:RadTextBox>
            <img alt="Info" src="/images/icon_info.png" title="Username Rules: 8 - 30 characters in length; can only contain the following: A-Z, a-z, 0-9, ! @ . _ - " class="infoicon" />
            <asp:Label ID="lblUsernameValidatorMsg" runat="server" Text=" " CssClass="label1error" Visible="false"></asp:Label>
            <asp:TextBox ID="txtUsernameValidatorStatus" visible="false" Text="Invalid" runat="server"></asp:TextBox>
            </telerik:RadAjaxPanel>
 
 
            <!--BUTTONS-->
            <telerik:RadButton ID="RadButton1" runat="server" Text="Submit" CausesValidation="true" >
                </telerik:RadButton>
 
         
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" >
    </telerik:RadAjaxLoadingPanel>
        
    </div></div>
 
    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" RelativeTo="Element"
            Position="MiddleRight" AutoTooltipify="true" ContentScrolling="Default" Width="225"
            Height="10" AutoCloseDelay="10000">
        </telerik:RadToolTipManager>
 
</asp:Content>



Protected Sub RadComboBox1_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBox1.SelectedIndexChanged
 
        Dim strConn As String = System.Configuration.ConfigurationManager.ConnectionStrings("CONN").ConnectionString
        Dim MySQL As String = "SELECT ticker FROM [table] WHERE [issuenum] = @issuenum"
 
        Dim MyConn As New Data.SqlClient.SqlConnection(strConn)
        Dim Cmd As New Data.SqlClient.SqlCommand(MySQL, MyConn)
        Dim DR As SqlDataReader
 
        With Cmd.Parameters
            .Add(New SqlClient.SqlParameter("@issuenum", UCase(Trim(RadComboBox1.SelectedValue))))
        End With
 
        lblConameLookup.Visible = True
        Try
            MyConn.Open()
            DR = Cmd.ExecuteReader()
            DR.Read()
            lblConameLookup.CssClass = "label1"
            lblConameLookup.Text = DR("ticker")
        Catch ex As Exception
            lblConameLookup.CssClass = "label1error"
            lblConameLookup.Text = "Please select a company from the dropdown menu."
        End Try
        MyConn.Close()
 
    End Sub
 
 
    'VALIDATION FOR USERNAME FIELD
    Protected Sub txtUsername_TextChanged(sender As Object, e As System.EventArgs) Handles txtUsername.TextChanged
       
        'CHECK DATABASE
        Dim strConn As String = System.Configuration.ConfigurationManager.ConnectionStrings("CONN").ConnectionString
        Dim MySQL As String = "SELECT X1,X2 FROM Ytable WHERE [field] = @param"
 
        Dim MyConn As New Data.SqlClient.SqlConnection(strConn)
        Dim Cmd As New Data.SqlClient.SqlCommand(MySQL, MyConn)
        Dim DR As SqlDataReader
 
        With Cmd.Parameters
            .Add(New SqlClient.SqlParameter("@param", Trim(txtUsername.Text)))
        End With
 
        Try
            MyConn.Open()
            DR = Cmd.ExecuteReader()
            DR.Read()
            lblUsernameValidatorMsg.Visible = True
            If DR.HasRows = True Then
                lblUsernameValidatorMsg.Text = "This username is unavailable."
                txtUsername.Focus()
            End If
        Catch ex As Exception
            'lblUserNameStatus.Text = ex.Message
        End Try
        MyConn.Close()
    End Sub


I omitted some of the fields on the input form for simplicity and changed some of the SQL.  I may have some unmatching divs and stuff like that but you can ignore it.

Any help would be greatly appreciated.

Thanks.
Kalina
Telerik team
 answered on 29 Oct 2012
1 answer
79 views
Hello,
I have a web application (Visual Studio.net, v.2008) that uses the RadGrid control.  The grid works fine when viewing the application from localhost on my desktop development environment.  It also works fine when connected to the server and running it from the web address.  The issue is that if I run it from another pc using the web address, I can not see the grid.  Please help!
Maria Ilieva
Telerik team
 answered on 29 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?