Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
178 views
I've got a few problems with font/ default font.
in FireFox for the empty editor window, select any font and font size, click back on the editor and selection is GONE, there is a WorkAround to do select-all first and then change a font, but it's not an option.
Second. Default font in IE don't applied, let's say you have Times New Roman 12 as a default in editor, so you put some text, in generated text Default Font is not present. so if this HTML will be saved into db and then shown on another page, it won't respect default font....
Rumen
Telerik team
 answered on 20 Jul 2009
1 answer
64 views

Greetings,

Sorry about the question title.  It should read:

"Using 'pasteHtml' to capture the value of an external input button"

I found the following code here on site with the associated title:

The following example will show you how to paste content into the editor's content area from an external input button:
----------------------------------------------------------------------------------------------------------------------------- 
<telerik:radeditor runat="server" ID="RadEditor1"></telerik:radeditor>
<input type="button" value="Paste Content" onclick="InsertSpan();return false;" />

<script type="text/javascript">
function InsertSpan()
{                 
  var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to the editor
  editor.pasteHtml('<span style="width:100px;border: 1px solid red;background-color: blue;color: white;">sample content</span>');
}
</script>    
-----------------------------------------------------------------------------------------------------------------------------

Can anybody explain to me how this does _anything_ with a value outside the RadEditor.  Seems to me there is a very necessary piece left out of the example.  For instance, when using  'OnClientCommandExecuting(editor, args)' to do this kind of thing 'within' the editor, the args parameter is used to produce the value of 'val':

var val = args.get_value();

editor.pasteHtml("<div style='width:100px;background-color:#fafafa;border:1px dashed #aaaaaa;'>" + val + "</div>");

As we can see, the code provided for the external input doesn't come close to addressing how to handle the outside value.

Am I missing something here??

Thanks!

 

Rumen
Telerik team
 answered on 20 Jul 2009
1 answer
117 views
Hello,

When I run the code below, postback, the data binds disappears completely, what is the solution to keep the data and just change the radcombobox?

Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerFormCreatedEventArgs) Handles RadScheduler1.FormCreated 
 
   Dim CB_Groupe As RadComboBox = TryCast(e.Container.FindControl("CB_Groupe"), RadComboBox) 
   Dim CB_Forfait As RadComboBox = TryCast(e.Container.FindControl("CB_Forfait"), RadComboBox) 
   CB_Forfait.Items.Add(New Telerik.Web.UI.RadComboBoxItem(CB_Groupe.SelectedValue)) 
   CB_Groupe.AutoPostBack = True 
   AddHandler CB_Groupe.SelectedIndexChanged, AddressOf CB_Groupe_SelectedIndexChanged 
 
End Sub 
 
Protected Sub CB_Groupe_SelectedIndexChanged(ByVal o As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) 
   Lbl_titre.Text = "j'ai changé" 
End Sub 

Peter
Telerik team
 answered on 20 Jul 2009
1 answer
121 views
Since I'm new to all Telerik controls, I might be missing something easy. Problem is I can't see the Custom Atttibutes value when I edit an appointment.
I have a field, ROOM varchar(30), in my SQL database and added a Custom Attribute ROOM. When adding new appointments, the ROOM attribute shows up nicely, and when I enter some text into this field, it is saved in the database. Thats good! 
But when I want to edit the appointment the ROOM textbox is empty - not as expected. So when I save the changes. the Room field is overwritten with a blank. All the standard fields works perfect.

Shouldn't I see the saved value for the attribute, or do I need to do something additional?
I have used the Datasource Wizzard in VS to create the SQLconnection. My Select command is "SELECT * from [Appointments]"

Atle


Peter
Telerik team
 answered on 20 Jul 2009
1 answer
106 views
Hello

I am loading in a treeview in a combo box for a user editing page...the combox box loads demographics, On first load if you have previously selected demographics i have got the combo to select the previous one you have chosen from the database but comparing the text and using the following

If

 

Me.RadComboBox1.Attributes.Item("TreeviewSelectedItem") Is Nothing Then

 

 

If objuser.DivisionTwo <> 0 Then

 

 

Me.RadComboBox1.Attributes.Add("TreeviewSelectedItem", objuser.DivisionTwoDesc)

 

 

ElseIf objuser.DivisionOne <> 0 Then

 

 

Me.RadComboBox1.Attributes.Add("TreeviewSelectedItem", objuser.DivisionOneDesc)

 

 

ElseIf objuser.PearsonBusiness <> 0 Then

 

 

Me.RadComboBox1.Attributes.Add("TreeviewSelectedItem", objuser.PearsonBusinessDesc)

 

 

Else

 

 

Me.RadComboBox1.Attributes.Add("TreeviewSelectedItem", "Please select a division")

 

 

End If

 

 

End If

this works and does preload the correct demographic in the combobox, but problem is when you press 'save' again and havent changed the combo box when it goes to save the demos if have this code to get the chosen id

 

 

Dim NewRadTreeDivisions As Telerik.Web.UI.RadTreeView

 

 

Dim DivisionValue As Integer

 

 

 

 

NewRadTreeDivisions = RadComboBox1.Items(0).FindControl(

"RadTreeView1")

 

 

If NewRadTreeDivisions.SelectedValue = "" Then

 

 

 

 

DivisionValue = 0

 

Else

 

 

 

 

DivisionValue = NewRadTreeDivisions.SelectedValue

 

End If

 

 

 

 

 



but now at this point NewRadTreeDivisions.SelectedValue  does equal "" therefore sets it back to 0.  even though the correct text is shown in the box the value isnt being passed through...how can i get this to keep the id???

thank you!

 

Yana
Telerik team
 answered on 20 Jul 2009
7 answers
236 views
I have upgraded a listbox to the new verison, looks good but there is an issue with the selected flag.

Scenario: The list box has 2 items (a & b).  I have selected item a via a mouse click and clicked the transfer button, then run the following code:

        protected void lbxAssigned_Transferred(object sender, RadListBoxTransferredEventArgs e) 
        { 
            foreach (RadListBoxItem listItem in lbxAvailable.Items) 
            { 
                if (listItem.Selected) 
                { 
                    ProductCarriers objPC = new ProductCarriers(); 
                    string test = listItem.Text; 
                    objPC.Allocate(Convert.ToInt32(listItem.Value), Convert.ToInt32(cbxProducts.SelectedValue)); 
                } 
            } 
            PopulateLists(); 
        } 

However when I debug the loop the first iteration (item a) passes the selection check, but the listitem.text and listitem.value are from item b.

I will attempt to code this another way for the moment, thought you would want to be aware.

Thanks,
Lee




ManniAT
Top achievements
Rank 2
 answered on 20 Jul 2009
1 answer
59 views
Hi,

I have just downloaded the Q2 2009 trial of the RadControls for ASP.NET AJAX for doing some testing with the Editor!
I also have downloaded the Q1 2009 dutch language files from http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-for-asp-net-ajax-localizations.aspx and added these files to the App_GlobalResources folder.

In a simple test page, where I have added the Rad Editor, I have set the Language property of the Editor to "nl-NL". When I run this page the tooltips of the buttons on the toolbar still show the english version. Did I forget something or does the Q1 language file not work with the Q2 Editor?

Thanks,
Danny
Svetlina Anati
Telerik team
 answered on 20 Jul 2009
5 answers
175 views
Hi,

first of all - you did a good job with this control - and you did it at the right time - because I need something like this at my current project.

Two things about the listbox:
a.) In Safari 4 (for windows) Enabled="false" does not disable the listbox
b.) In IE8 vertical scrolling is a bit "strange" (not really a problem)
-- sometime the thumb "jumps" a bit (the larger the thumb is the better you can see it)
--You can see this when you make a scrolling listbox and simply keep the mouse pressed on the down button.
--- it will start scrolling - and then jump back up - followed by "normal scrolling"

a.) is important
b.) is just "2 pixels away from perfection" :)

Another thing - I messed around a bit with the thing - searched the documentation and found nothing about
"Serverside Data extraction".

First I was afraid that this is not possible (there is a sample which tells "Autopostback must be true to update...");
but later I found that this is possible - it's only not documented.

I would suggest to provide a sample which show's such a scenario like adding "extras to an item".
Example - provide a user with "Shipping options" where he  can choose from a list like "Overnight, FastTrack, Insurance, GPS Tracked".
On the server the data is extracted from the "RadListBox2.Items" collection.
And that - combined with a Grid (Add new item) would be an interesting (and I guess common) scenario.

This is just an example - maybe I'll provide such a thing in the Code Library if I find time.

Regards

Manfred


ManniAT
Top achievements
Rank 2
 answered on 20 Jul 2009
2 answers
168 views
Hi,

I'd like to override the default loading image set in the various skins.  What is the CSS style that I'd need to do this for?

Changing the css based image will be a lot quicker than setting the image for each panel in each page...

Regards,

Jon

Jon
Top achievements
Rank 1
 answered on 20 Jul 2009
5 answers
200 views
Please I will like to know if RadMenu and RadCombo plus several other controls work on mobile devices such as blackberry and other windows mobiles phone? Cuurently, they behave as disables and does not respond to click. Thank you
Paul
Telerik team
 answered on 20 Jul 2009
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?