Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
96 views
I tried to reset the styles of RadEditor following the instructions in this post explain, but the result is that my publishers are using the rules defined in the main stylesheet. Any idea how I could fix it?.

Like you can see in the screenshot that i send you. The problem it's that RadEditor continue load the rules defined in the global styles for the body element, like a background image, center text and no scrollbars (overflow:hidden)

This it's the code that i use to trying to reset the styles, in the head of my masterpage, before the link to the global stylesheet.

<style type="text/css">
        .reLeftVerticalSide, .reRightVerticalSide, .reToolZone, .reToolCell
        {
            background: white transparent !important;
            text-align: left;
            overflow: auto;
        }
        .RadEditor table, .reToolbar, .reToolbar li, .reTlbVertical, .reDropDownBody ul, .reDropDownBody ul li, .RadWindow table, .RadWindow table td, .RadWindow table td ul, .RadWindow table td ul li
        {
            margin: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            list-style: none !important;
        }
        .reWrapper_corner, .reWrapper_center, .reLeftVerticalSide, .reRightVerticalSide, .reToolZone, .reEditorModes, .reResizeCell, .reToolZone table td, .RadEditor .reToolbar, .RadEditor .reEditorModes
        {
            border: 0 !important;
        }
        .reToolbar li, .reToolbar ul li, .reInsertTable .reTlbVertical .reToolbar li
        {
            float: left !important;
            clear: none !important;
            border: 0 !important;
        }
    </style>

I'm using Windows XP SP3 with Internet Explorer 6.0 and Q1 2010.

I look forward to your response

Regards,
Felipe Meléndez
Felipe de Jesús
Top achievements
Rank 1
 answered on 01 Jun 2011
3 answers
124 views

The server side event not firing when page is ajaxed and onclientclick is added

The method GV1_update does not fire


Code:====================================================

 

 

<form id="form1" runat="server">

 

 

 

 

 

 

 

 

<asp:ScriptManager ID="ScriptManager" runat="server" />

 

 

<

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX= "true" EnableEmbeddedScripts="true" >

 

 

</

 

telerik:RadAjaxManager>

 

 

<

 

telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server">

 

 

 

 

 

 

 

 

 

<asp:GridView ID="GV_EmpStatus" runat="server" AutoGenerateColumns="False" Width="264px">

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

<asp:TemplateField HeaderText="Code">

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

<asp:LinkButton ID="employmentStatusCode" Width="50px" runat="server" OnClick="Get_EmpStatusReason"

 

 

 

 

 

 

 

 

Text='<%#DataBinder.Eval(Container.DataItem, "employmentStatusCode")%>'>

 

 

 

 

 

 

 

 

</asp:LinkButton>

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

</asp:TemplateField>

 

 

 

 

 

 

 

 

<asp:TemplateField HeaderText="Description">

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

<asp:TextBox ID="employmentStatusDesc" BorderStyle="None" Width="170px" runat="server"

 

 

 

 

 

 

 

 

Text='<%#DataBinder.Eval(Container.DataItem, "employmentStatusDesc")%>'>

 

 

 

 

 

 

 

 

</asp:TextBox>

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

</asp:TemplateField>

 

 

 

 

 

 

 

 

<asp:TemplateField>

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

<asp:ImageButton ID="btnupdate1" runat="server" ImageUrl="../Image/pencil2.gif" OnClick="GV1_update"

 

 

 

 

 

 

 

 

ToolTip="Update" OnClientClick="if(!ValidateDesc(this,'btnupdate1','employmentStatusDesc')) {return false}else {return true};"/>

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

</asp:TemplateField>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

<SelectedRowStyle BackColor="Transparent" Font-Bold="True" />

 

 

 

 

 

 

 

 

<HeaderStyle BackColor="#E0E0E0" />

 

 

 

 

 

 

 

 

</asp:GridView>

 

 

 

 

 

 

 

</

 

 

telerik:RadAjaxPanel>

 

 

 

 

 

 

 

 

 

</form>

 

mike
Top achievements
Rank 1
 answered on 01 Jun 2011
4 answers
648 views
Hello,

As I have to test some RadControls components for my company, I'm currently working on the TreeList control. Even if I only try to do basic stuff (populate the control with a database query) It doesn't work and I just can't figure out why !
My previous investigation lead me to think that issue is related to DataKeyNames and ParentDataKeyNames properties but I'm not sure.
So instead of talking about my work, I'll let you get an code snippet so as you can take a look at it :

<telerik:RadTreeList ID="RadTreeList1" runat="server"
        AllowMultiItemEdit="False" AllowPaging="True" Culture="(Default)"
        DataKeyNames="SousThemeID" ParentDataKeyNames="SousThemThemeID" AutoGenerateColumns="True" DataSourceID="SqlDataSource1" IsItemInserted="False">
 
<ValidationSettings CommandsToValidate="PerformInsert,Update"></ValidationSettings>
        <Columns>
            <telerik:TreeListBoundColumn UniqueName="column"></telerik:TreeListBoundColumn>
        </Columns>
<EditFormSettings EditFormType="AutoGenerated"></EditFormSettings>
</telerik:RadTreeList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:ContenuConnectionString %>"
        SelectCommand="SELECT [SousThemeID], [SousThemLibelle], [SousThemThemeID] FROM [SousTheme]">
    </asp:SqlDataSource>


Here's a little explanation concerning my query :

1. it works well so the problem doesn't come from here
2. SousThemeID : Integer, SousThemLibelle : String, SousThemThemeID : integer
3. SousTheme (which means under-theme or theme below) is related to Theme (Theme.ThemeID = SousTheme.SousThemThemeID).

Example  :

[ 1 ] [ "test" ] [ 1 ]
[ 2 ] [ "whatever you want" ] [ 1 ]
[ 3 ] [ "Computer" ] [ 1 ]
[ 4 ] [ "Economy" ] [ 2 ]
[ 5 ] [ "Finance" ] [ 2 ]


If you have any idea on what's going wrong in my code, please let me know.
Thanks in advance.


Alexandre.
alexandre
Top achievements
Rank 1
 answered on 01 Jun 2011
1 answer
80 views

I have 4 RadTextBoxes on my form.  I'm using txtComments.Text to get the text the user has entered.  However,  The text property is blank.  Is there something I'm missing?

ASPX:

 

 

 

<telerik:RadTextBox ID="txtDocumentReviewer" runat="server" MaxLength="1500" Skin="DMID" EnableEmbeddedSkins="False" Columns="50" Rows="5" TextMode="MultiLine" > </telerik:RadTextBox>

C#:

 

 

 

oProfile.DocumentReviewerComments = txtDocumentReviewer.Text;

 

Annette
Top achievements
Rank 1
 answered on 01 Jun 2011
1 answer
106 views
Hi,
 I have One Grid View when i click submit button whole grid values saved in database and showing one alert message. When Displaying Alert Message the gridview disappears in the background.
I m using below script to show Display message

ScriptManager.RegisterClientScriptBlock(

Me, Me.GetType, "clientScript", "alert('Rates has Updated Successfully');", True). Can any give me any solution for this.

 



Marin
Telerik team
 answered on 01 Jun 2011
3 answers
93 views
Hi,  By typing in starting letters, radcombo can auto complete selection for first match.  Is there any way to do auto complete for non starting letters ? For example:    If the dropdown list options are  "red apple"  "green apple" "red grape" "green grape".   user type in "red" and press Tab,  the "red apple"  will be auto selected.   Is there any way to auto select "red apple" by typing in "apple" ?

Thanks

-susan
Dimitar Terziev
Telerik team
 answered on 01 Jun 2011
5 answers
110 views

Hi,

I have a RadCombo with the following event : OnClientSelectedIndexChanging which contains a call to a web service which returns a value. Depending on the value I may need to cancel the change. I have a callback function attached to the webservice.

 

How would I going about cancelling the change if I needed to?

 

Thanks

Dimitar Terziev
Telerik team
 answered on 01 Jun 2011
5 answers
363 views
Hi,

I have a series of user control that inherit from RadComboBox. They are used throughout the app, so this is primarily for the purpose of consistency and code re-use. However, I cannot seem to get my default 'Select a <xyz>' item to be the selected item upon the first page load. They show up in the drop-down but the text area of the combo box is blank until Postback, at which time it shows the 'Select a <xyz>' item correctly (assuming the user didn't pick anything).

Everything else seems to be working fine. Frankly, though, my OOP chops are a bit rusty and so I am wondering if I am doing this completely wrong.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using OSIRISModel;
 
namespace Telerik.Web.UI.OSIRIS
{
  /// <summary>Summary description for OS_JobStatusComboBox</summary>
  public class OS_JobStatusComboBox : RadComboBox
  {
    #region Constructor
    public OS_JobStatusComboBox()
    {
      //
      // TODO: Add constructor logic here
      //
    }
    #endregion
 
    #region Control Events
    protected override void OnLoad(EventArgs e)
    {
      if (!Page.IsPostBack)
      {
        OSIRISEntities context = ((OSIRISPage)Page).OSIRISContext;
 
        List<JobStatu> items = context.JobStatus.ToList<JobStatu>();
        this.DataTextField = "Description";
        this.DataValueField = "ID";
        this.DataSource = items;
        this.RegisterWithScriptManager = false;
 
        this.AppendDataBoundItems = true;
        this.Items.Insert(0, new RadComboBoxItem("Select a Job Status", ""));
        this.SelectedIndex = 0;
      }
    }
 
    // This is to prevent double-binding in cases where this control is used inside another control that causes Child Databinding (such as Formview)
    private bool Bound = false;
    protected override void OnDataBound(EventArgs e) { Bound = true; }
    protected override void OnPreRender(EventArgs e) { if (Bound == false) { this.DataBind(); } }
 
    #endregion
  }
}


Little help?
Kalina
Telerik team
 answered on 01 Jun 2011
1 answer
137 views
When you click on an anchor tag, it leaves a small dotted border around it. This is also true of the dates in a RadCalender.

However, because I have set the height of my calendar the rows have increased in height and when I click on a date the anchor tags has its border, but this is only an nth of the height of the row and looks unatractive. I've looked at the css that makes the date and row up and can't see how i'd set it up to display the whole date item as a block?

Can anyone help?

I've attached a screen shot to highlight my issue.

Vasil
Telerik team
 answered on 01 Jun 2011
7 answers
240 views
Hello Telerik Team,

I referred this blog and was able to load UserControls dynamically from code-behind.
Even this blog shows how to close the tabs.
But, I would like to know how can I close the tabs if I create and tabs dynamically from code-behind.
Please help with a working code to this.

MyCode:
 Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
        If Not Page.IsPostBack Then 
            AddTab("Custom1")  
            AddTab("Custom2")  
        End If 
    End Sub 
    Private Sub AddTab(ByVal tabName As String)  
        Dim tab As New RadTab()  
        tab.Text = tabName  
        RadTabStrip1.Tabs.Add(tab)  
        Dim pageView As New RadPageView()  
        pageView.ID = tabName  
        RadMultiPage1.PageViews.Add(pageView)  
    End Sub 
 
    Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated  
        Dim userControlName As String = e.PageView.ID + ".ascx" 
        Dim userControl As Control = Page.LoadControl(userControlName)  
        userControl.ID = e.PageView.ID + "_userControl" 
        e.PageView.Controls.Add(userControl)  
    End Sub 
aspx:
 <script type="text/javascript">  
       var tabStrip = $find("<%= RadTabStrip1.ClientID %>");  
       var multiPage = $find("<%= RadMultiPage1.ClientID %>");  
       var tab = tabStrip.findTabByText(tabText);  
       var pageView = tab.get_pageView();  
 
       var tabtabToSelect = tab.get_nextTab();  
       if (!tabToSelect)  
           tabtabToSelect = tab.get_previousTab();  
 
       tabStrip.get_tabs().remove(tab);  
       multiPage.get_pageViews().remove(pageView);  
 
       if (tabToSelect)  
           tabToSelect.set_selected(true);  
 
   </script> 
 
 <telerik:RadTabStrip Style="position: absolute; top: 84px;" ID="RadTabStrip1" SelectedIndex="0" 
                runat="server" MultiPageID="RadMultiPage1">  
                <TabTemplate> 
                      <%# DataBinder.Eval(Container, "Text") %> 
        <img style="margin-left: 10px" src="img/close.png" alt="delete" onclick="deleteTab('<%# DataBinder.Eval(Container, "Text") %>')" /> 
    </TabTemplate> 
 
            </telerik:RadTabStrip> 
            <telerik:RadMultiPage Style="position: absolute; top: 134px;" ID="RadMultiPage1" 
                runat="server" SelectedIndex="0">  
            </telerik:RadMultiPage> 
    </div> 

This doesn't work for tabs instantiated from code-behind.

Thanks
Veronica
Telerik team
 answered on 01 Jun 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?