Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
95 views
Some of our users were complaining about automatically added empty rows in their texts. I could reduce the problem to the following html code snippet:

<h1>
 <span style="font-family: times new roman;">Create Instrumentation Loops</span>
</h1>
<p>
 <span style="font-family: times new roman; font-size: 11pt;">bla bla bla </span>
 <span style="font-family: times new roman; font-size: 11pt;">another text
  <p>loop object</p>
 </span>
</p>
<p>&nbsp;</p>
<h1>
 <span style="font-family: times new roman;">Functional Requirements</span>
</h1>

Every time you switch between design or html view (or every time you save) a new line is added (<p>&nbsp;</p>).
What can I do to avoid this?

Winfried
Rumen
Telerik team
 answered on 14 Apr 2010
1 answer
126 views

I want to set the DataTextField of a RadComboBox at pageload according to the users prefered language - and keep that value.
So far my code looks like this:
(a small part of the mastertableview of the grid RadGridVehicle)

                <telerik:GridDropDownColumn DataSourceID="sdsHaulierType" 
                                            DataField="HaulierType" DataType="System.Int32" 
                                            HeaderText="Haulier type"   
                                            ReadOnly="true" 
                                            ListTextField="HaulierTypeName"   
                                            ListValueField="HaulierTypeID"   
                                            DropDownControlType="DropDownList" 
                                            SortExpression="HaulierType" 
                                            UniqueName="HaulierType" 
                                            EditFormColumnIndex="0"   
                                            Visible="true" ForceExtractValue="Always" >  
                    <FilterTemplate>  
                        <telerik:RadComboBox ID="cbHaulierType" runat="server"   
                                             AppendDataBoundItems="true" 
                                             DataSourceID = "sdsHaulierType" 
                                             DataValueField = "HaulierTypeID" 
                                             DataTextField = "HaulierTypeName" 
                                             SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("HaulierType").CurrentFilterValue %>'  
                                             OnClientSelectedIndexChanged="HaulierTypeChanged">  
                            <Items>  
                                <telerik:RadComboBoxItem Text="All" />  
                            </Items>  
                        </telerik:RadComboBox>  
                        <telerik:RadScriptBlock ID="sbHaulierType" runat="server">  
                           <script type="text/javascript">  
                                function HaulierTypeChanged(sender,args)   
                                {  
                                    var tableView=$find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                    tableView.filter("HaulierType",args.get_item().get_value(),"EqualTo");                                      
                                }  
                            </script>   
                        </telerik:RadScriptBlock>  
                    </FilterTemplate>  
                </telerik:GridDropDownColumn> 

I'm using a table called HaulierType with the following columns:
  • HaulierTypeID (PK)
  • HaulierTypeName (default column for DataTextField in the RadComboBox)
  • SVHaulierType
  • DAHaulierType
    <asp:SqlDataSource ID="sdsHaulierType" runat="server"   
                       ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"   
                       SelectCommand="SELECT * FROM [HaulierType]">  
    </asp:SqlDataSource> 

I can get the grid to show the correct values like this:
protected void RadGridVehicle_Load(object sender, EventArgs e)  
    {  
        ddc = (GridDropDownColumn)RadGridVehicle.MasterTableView.Columns.FindByUniqueName("HaulierType");  
        if (userLang == "da")  
        {  
            ddc.ListTextField = "DAHaulierType";  
        }  
        else if (userLang == "sv")  
        {  
            ddc.ListTextField = "SVHaulierType";  
        }  
    } 

What's missing is setting the filtervalues in the gridcolumn.
How do I set the DataTextField serverside and in which event?

Please help - I'm totally stock.
Iana Tsolova
Telerik team
 answered on 14 Apr 2010
1 answer
124 views
Hello, I'm hoping someone can help me with this problem:

In my Rad editor I have a default-type editor tool that sets the fore color of text.  You click on it and get a panel that opens giving you the option of choosing many colors.  However,  my users reuse just two colors time after time.  Thus, I would like to add two more buttons that would be to simply add either one of those colors.

My preference would be to have the functionality act like the Bold or Italics buttons (i.e., when clicked, the color would stay on until changed).  However, if that isn't possible (or is too time consuming to develop) then a button that would insert font tags on either side of selected text would work.

How can I accomplish this?

Thank you!
Rumen
Telerik team
 answered on 14 Apr 2010
1 answer
150 views
Hi,

I want to implement a client-side javascript function at the OnClientAppointmentClick event, but when I click the appointment it always performs a postback. Can I prevent this postback?

Thanks,
Danny
Peter
Telerik team
 answered on 14 Apr 2010
2 answers
223 views
Hi
Sorry - newbie question. I've tried to get my spell check working in my editor but I'm not quite there. When I test I spellchecker symbol but when I click on it I get two entries in the dropdown (both say English). I click on them I get one of three errors:
Spell Check Handler Server Error:12030
Spell Check Handler Server Error:12031
Spell Check Handler Server Error:405

I have got my .tdf file in the right location (en-US.tdf) and I know the application is finding the tdf. I'd  be very grateful if someone could look at my code and tell me what I have done wrong.

In my web.config file I have the following entry in web,config in http handlers in system.web:

<

 

add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />

 

 

 

 

 

<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />

 

 

 

<add verb="*" validate="false" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" />

 

 

 

<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />

 

 


In system.webServer I have the following in handlers:
 

<add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

 

 

 

<add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

 

 

 

<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

 

The relevant lines in the aspx file are:

 

(top of page)
<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

 

 

(start of body / form)
  

 

 

<body>

 

 

 

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

 

<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">

 

 

</telerik:RadScriptManager>

 

 

 


radEditor Control
<telerik:RadEditor ID="txtVisitNotes" runat="server" EditModes="Design" Height="300px"

 

Skin="Telerik" Width="99%">

 

 

<Tools>

 

 

<telerik:EditorToolGroup>

 

 

<tools>

 

 

<telerik:EditorTool Name="AjaxSpellCheck" />

 

 

</tools>

 

 

</telerik:EditorToolGroup>

 

 

</Tools>

 

 

<Languages>

 

 

<telerik:SpellCheckerLanguage Code="en-US" Title="English" />

 

 

</Languages>

 

 

<Content>

 

 

</Content>

 

 

</telerik:RadEditor>

 

 

 


The relevent lines in the code behind look like this:

 

protected void Page_Load(object sender, EventArgs e)

 {

txtVisitNotes.Modules.Clear();

lblMessage.Visible =

false;

 

 

 

if (!IsPostBack)

 {

txtVisitNotes.Languages.Add(

new SpellCheckerLanguage("en-US", "English"));

 

 txtVisitNotes.SpellCheckSettings.AjaxUrl =

"True";

 

 

txtVisitNotes.SpellCheckSettings.SpellCheckProvider =

SpellCheckProvider.PhoneticProvider;

 

 

 


thank you kindly

M
 
Michael Hurse
Top achievements
Rank 1
 answered on 14 Apr 2010
1 answer
84 views
The older version of the grid used to have a Client Event named OnRequestStart.  I see a long list of events in the newest version of the grid, but not OnRequestStart.  Did the event name change, or is there another way to plug in to a similar event?
Daniel
Telerik team
 answered on 14 Apr 2010
1 answer
125 views

Hi,

 

I'm using EntityDataSource on RadScheduler and it works fine.

I've added a new resource type "Paciente" (Patient) associated with edsPacientes EntityDataSource as shown on the code bellow.

It works fine for appointment creation: populates Paciente combo box with values from Pacientes table and save the consult with the correct patient.id value (I've checked the database record).

But when I try to edit the newly created appointment the value on "Paciente" combo box is not set. See attached picture.

<asp:EntityDataSource ID="edsConsultas" runat="server"   
    ConnectionString="name=jaruche1Entities"   
    DefaultContainerName="jaruche1Entities" EnableDelete="True" EnableInsert="True"   
    EnableUpdate="True" EntitySetName="Consultas" EntityTypeFilter="Consulta">  
</asp:EntityDataSource> 
<asp:EntityDataSource ID="edsPacientes" runat="server"   
    ConnectionString="name=jaruche1Entities"   
    DefaultContainerName="jaruche1Entities" EnableDelete="True" EnableInsert="True"   
    EnableUpdate="True" EntitySetName="Pacientes" EntityTypeFilter="Paciente">  
</asp:EntityDataSource> 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="300px" RenderMode="Inline" 
    Width="100%">  
    <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="Termino" DataKeyField="Id" 
        DataSourceID="edsConsultas" DataStartField="Inicio" DataSubjectField="Observacoes" 
        Skin="Office2007" StartInsertingInAdvancedForm="True" SelectedView="WeekView">  
        <ResourceTypes> 
            <telerik:ResourceType DataSourceID="edsPacientes" ForeignKeyField="Paciente.Id" 
                KeyField="Id" Name="Paciente" TextField="Nome" /> 
        </ResourceTypes> 
    </telerik:RadScheduler> 
</telerik:RadAjaxPanel> 
 

Am I doing something wrong or this is a bug on RadScheduler?

I'm using Q1-2010 release.

Thanks!
Fernando
Peter
Telerik team
 answered on 14 Apr 2010
1 answer
103 views
Hi,
I've an issue using the Radeditor inside an iframe.

In an older version I used the ContextMenu of the Editor was shown outside the Iframe.
Now the ContextMenu is shown inside the Iframe.

Is there a way to show the ContextMenu outside an IFrame

Regards
Rumen
Telerik team
 answered on 14 Apr 2010
7 answers
224 views
Hello,

I an new to RadGrid and run in to a issue when using Client-Side Insert - In my grid, I have one buttoncolumn and two boundcolumn. What I want to do is to add a new row into my grid by clicking a button out of the grid, pretty simple, right? However, when using Client-Side insert by calling a javascript function, the new row is added and two boundcolumns are populated properly, but leaves buttoncolumn blank. Here is the ASPX code:
 

 

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type ="text/javascript" >
        var custodian =
        {
            CustodianID:null,
            EmailAddressID: null,
            EmailAddress: null,

            create: function() {
                var obj = new Object;
                obj.CustodianID = 0;
                obj.EmailAddressId = "";
                obj.EmailAddress = "";
            }
        };

        function updateChanges() {
            PageMethods.AddCustodian("asd", updateGrid);
            //MyWebService.UpdateEmployeeByEmployee(getValues(), updateGrid);
        }
        function updateGrid(result) {
            var tableView = $find("<%= rgCustodians.ClientID %>").get_masterTableView();
            tableView.set_dataSource(result);
            tableView.dataBind();

            //var grid = $find("<%= rgCustodians.ClientID %>");
            //grid.repaint();
        }
    </script>
</telerik:RadCodeBlock>
<span><telerik:RadTextBox ID="tbCustomdian" runat="server" Width ="200px">
</telerik:RadTextBox></span>
<span style ="margin-left:5px; vertical-align:middle" >
<asp:Button ID="btnAddCustodian" runat="server"
    Text="<%$Resources:Labels, add %>" Width ="100px"
    OnClientClick="updateChanges(); return false;"  /></span>
<telerik:RadGrid ID="rgCustodians" runat="server" AutoGenerateColumns="False"
    AutoGenerateDeleteColumn="False" GridLines="None"
    ondeletecommand="rgCustodians_DeleteCommand"
    onneeddatasource="rgCustodians_NeedDataSource" Width="100%">
   
<MasterTableView  Width="100%" TableLayout="Fixed" >
    <Columns>
        <telerik:GridBoundColumn  HeaderText="EmailAddressId" Visible ="False" DataField="EmailAddressId" UniqueName="EmailAddressId" ></telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Cutodians" UniqueName="EmailAddress" DataField="EmailAddress"></telerik:GridBoundColumn>
        <telerik:GridButtonColumn  Display ="true" Visible ="true" Text="deleee" />
    </Columns>
    <NoRecordsTemplate>
     <div> <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Labels, norecords%>" /> </div>
   </NoRecordsTemplate>
</MasterTableView>
</telerik:RadGrid>


Did I do something wrong?
Thanks in advance
Wei

 

 

 

 

 

Iana Tsolova
Telerik team
 answered on 14 Apr 2010
1 answer
134 views
Hello,

I'm trying to disable the combo box on the client, and having it look disabled (using the italicized font, which I have been able to setup).  I manually invoke the requesting of items from the web service, and on the itemsrequested client-side event, I do this:

function

 

itemsRequested(sender, e) {

 

 

  if (sender.get_items().get_count() == 0) {

 

       sender.set_enabled(

false);

 

 

        return;

 

  }

}

This actually runs, but the UI of the combo doesn't change to the new style...  do I have to programmably do it?

Thanks.

Kalina
Telerik team
 answered on 14 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?