Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
149 views
I am having a problem with special lists in the RadEditor. I need to use special types of lists (roman numerals, symbols, letters, etc) which is an option available in the RadEditor's Style Builder. However, any time I attempt to apply these styles it just doesn't work.

I was able to reproduce this with the RadEditor in your demo section. (http://demos.telerik.com/aspnet-ajax/editor/examples/xhtmlvalidatortrackchangesformatcodeblockdialogs/defaultcs.aspx) Ive attached images that will show you the original bulleted list and then the bulleted list after I attempted to format it to be roman numerals (i, ii, iii, iv, ...).

The html for each list is as follows.
Original bulleted list:
<ul>
    <li>
    <em>Out-of-the-box XHTML-enabled Output...</em>
    </li>
    <li>
    <em>Unmatched Loading Speed and Performance</em>
    </li>
    <li>
    <em>Microsoft Word-like Spell-checking</em>
    </li>
    <li>
    <em>Seven Ways for Pasting from Word</em>
    </li>
    <li>
    <em>Multilevel Undo/Redo with Action Trails</em>
    </li>
    <li>
    <em>Extended Functionality Through Integrated Controls</em>
    </li>
</ul>

After Formatting with Style Builder:
<ul>
            <li>
            <em><span></span></em></li>
            <span>Out-of-the-box XHTML-enabled Output...
            Unmatched Loading Speed and Performance
            Microsoft Word-like Spell-checking
            Seven Ways for Pasting from Word
            Multilevel Undo/Redo with Action Trails
            Extended Functionality Through Integrated Controls</span>
            <li><em></em>
            </li>
</ul>

I did notice that for your upcomming Q1 release there is "Issue ID 4835 - IMPROVE StyleBuilder dialog for RadEditor." I wanted to find out if this issue is resolved with that, and if not I wanted to bring this to your attention.

Thank you!
Niko
Telerik team
 answered on 18 Mar 2011
5 answers
163 views

Well, I have seen similar problems and corresponding solutions on the forums, but none of those was applicable for this problem. I already have tried and searched almost any given solution on the forums here and around the internet, but unfortunately to no avail.

So, what exactly is the problem? I have got a RadComboBox which has an ObjectDataSource. This ComboBox has been placed in an EditItemTemplate within a RadListView. I want this RadComboBox to display the name of the currently selected customer as SelectedIndex (SelectedValue or Text). Items are filled based upon data out of an XmlDataSource object. The ObjectDataSource contains all possible customers.

Let's say I have inserted a new item with customer: "Customer1", but I'd like to edit this item. When you go into the EditItemTemplate view, I want to have the RadComboBox select (SelectedIndex/Value or Text) "Customer1" (which is based upon the XmlDataSource) from the ObjectDataSource.

My RadComboBox and ObjectDataSource look like:

<telerik:RadComboBox ID="RadComboBox1" 
    runat="server" 
    AllowCustomText="false" 
    DataSourceID="ObjectDataSource1" 
    DataTextField="Name" 
    DataValueField="Name"
    DropDownWidth="128px"
    EmptyMessage="-Customer-" 
    EnableAutomaticLoadOnDemand="true"
    EnableVirtualScrolling="true" 
    Filter="Contains"
    Height="150px" 
    ItemsPerRequest="10"
    MarkFirstMatch="true"
    MinFilterLength="2"
    ShowMoreResultsBox="true"
    Width="128px">
</telerik:RadComboBox>
<asp:ObjectDataSource ID="ObjectDataSource1"
    runat="server" 
    SelectMethod="GetCustomers" 
    TypeName="RadControlsWebApp1.Customers">
</asp:ObjectDataSource>
The SelectMethod="GetCustomers" returns a List<Customer> object. A Customer is just a simple class which holds a (string) name. You could actually just use a List<string> for the same purpose.

The XML file (XmlDataSource object) looks like:
<?xml version="1.0" encoding="utf-8"?>
<Activities>
  <Activity Customer="Customer1" Project="Project1" />
  <Activity Customer="Customer1" Project="Project2" />
  <Activity Customer="Customer2" Project="Project2" />
  <Activity Customer="Customer3" Project="Project3" />
</Activities>

I have tried to set the Text property of the RadComboBox as follows: Text='<%# Bind("Customer") %>' and setting the RadComboBox.SelectedIndex or RadComboBox.SelectedValue properties programmatically, but as I already mentioned, without results. Perhaps I tried to set the properties in the wrong event(s).
Simon
Telerik team
 answered on 18 Mar 2011
3 answers
100 views
Hi. I have been trying to figure out how to reorder the items listed in the chart legend, but so far to no avail. I'd like to do something along the lines of this:

                List<Telerik.Charting.ChartLabel> legendItems = new List<Telerik.Charting.ChartLabel>();

                legendItems.Add(RadChart1.Legend.Items[0]);
                legendItems.Add(RadChart1.Legend.Items[2]);
                legendItems.Add(RadChart1.Legend.Items[5]);
                legendItems.Add(RadChart1.Legend.Items[1]);
                legendItems.Add(RadChart1.Legend.Items[4]);
                legendItems.Add(RadChart1.Legend.Items[3]);
                legendItems.Add(RadChart1.Legend.Items[6]);

                for (int i = 0; i < 7; i ++)
                    RadChart1.Legend.Items[i] = legendItems[i];

But when I run this the RadChart1.Legend.Items appears empty. I am sure I am missing something here and was hoping you'd be able to lend a hand.

I would essentially like to know how I can reorder the labels that appear in the legend block.

Thank you!
Evgenia
Telerik team
 answered on 18 Mar 2011
6 answers
122 views
I am a newbie in using telerik controls so my question may be foolish but i am stuch here so i gotta ask.
i am trying to add appointments into the radscheduler on pageload.....
but i am getting this error
'Telerik.Web.UI.AppointmentCollection' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'Telerik.Web.UI.AppointmentCollection' could be found (are you missing a using directive or an assembly reference?)'
i have referenced Telerik.Web.UI in my page as well as the project....

the code snippet is as below
**dr is the object of SqlDataReader

Appointment ap = new Appointment();
 ap.Subject = dr["Subject"].ToString();
ap.Start = DateTime.Parse(dr["StartDateTime"].ToString());
ap.End = DateTime.Parse(dr[""].ToString());
ap.RecurrenceRule = dr["RecurrenceRule"].ToString();

 this.RadScheduler1.InsertAppointment(ap);   ///Error is on this line...

Thanks in advance

Regards,
Sher


Sher
Top achievements
Rank 2
 answered on 18 Mar 2011
1 answer
95 views
Hey everyone,

Our current asp.net web application we use to manage our documents just records the URL of where the file is located (in a database). Within a gridview control the users can click the link to view the document. The gridview also has another column that can store a comment pertaining to the file, also located in a database.

Is it possible to have a comment column within the FileExplorer control ? I imagine a database of some sort will still need to be used to hold the comment information.

Any ideas?
Dobromir
Telerik team
 answered on 18 Mar 2011
0 answers
21 views
telerik RadScheduler non working day not displaying shaded on calendar view In IE8. its show Firefox,chrome,safari but not displaying in Only IE8 please help me as soon as possible



santosh
Top achievements
Rank 2
 asked on 18 Mar 2011
4 answers
91 views
I am trying to use a RadTabStrip control with a Close button on every tab. The Close button is created using TabTemplates.

Everything works fine, with the exception of IE6, where even though I use the styles provided in the Telerik example for the IE6 to fix the line-height bug,  it still does not render properly. The bottom of the tabs is slightlly missaligned.  

I have included a screen shot of the problem (UISample.JPG). Also, bellow I listed the sample aspx code and the css I am using.

I have tried to play with the css style, but I did not manage to get it to work properly. Does anybody have a solution for this ?

Thanks a lot for the help !


This is the aspx code:

 

 

 

<head runat="server">   
<title>Untitled</title
<link rel="stylesheet" type="text/css" href="styles.css" /> 
</head>
<body>
<form id="mainForm" runat="server">
 <telerik:RadScriptManager runat=server ID="ScriptManager"></telerik:RadScriptManager
 <div
  <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" Skin="Vista" ScrollChildren="true" ScrollButtonsPosition="Middle" Orientation="HorizontalTop"
  <TabTemplate
   <div class="textWrapper"
    <%# DataBinder.Eval(Container, "Text") %> 
   </div
   <span class="ie6shim"></span
   <img src="Images/Close.gif" alt="Close" onclick="deleteTab('<%# DataBinder.Eval(Container, "Text") %>')" /> 
  <TabTemplate
<Tabs
 <telerik:RadTab runat="server" Selected="True" Text="Tab1"></telerik:RadTab
 <telerik:RadTab runat="server" Text="Tab2"></telerik:RadTab
 <telerik:RadTab runat="server" Text="Tab3"></telerik:RadTab
</Tabs
</telerik:RadTabStrip
</div
</form
</body>
  
  
  
This is the styles.css file:
   
  
.tabStrip
 position:absolute; 
 top:0; 
}
  
.rtsIn img 
 vertical-align:middle; 
 width: 14px; 
 height: 14px; 
 margin-left: 10px; 
}
  
  
.rtsIn .textWrapper 
 display: inline; 
}
   
  
/* IE6 fixes for line-height bug */
  
* html .rtsIn img 
 margin-bottom: 10px; 
}
  
* html .rtsIn .textWrapper 
 float: left; 
 height:26px; 
}
  
* html .rtsIn .ie6shim 
 height: 26px; 
 display: inline-block; 
}

 

 

 

 

 

 

 

 

 

vivek
Top achievements
Rank 1
 answered on 18 Mar 2011
4 answers
122 views
Hi,
I want to restrict the user to enter maximum of 4 alphabets in subjects field, and i also want to control the display size of the subject field.
Can u please guide me how to perform these activities. Your quick response will be greatly appreciated.

Thanks & Regards,
Sher
Sher
Top achievements
Rank 2
 answered on 18 Mar 2011
1 answer
86 views
hey there,

i have a radgrid with CRUD operations.I've used automatic inserts an updates and used this event OnInsertCommand="RadGrid1_InsertCommand" and used advanced data binding with NeddDataSource event.But the problem is that on clicking insert or update after filling the required fields, my edit form is not closed and grid is not refreshed.When i press cancel than the grid is refreshed and the values that i've inserted or updated are than visible.What cud be the possible reason??...

Thanks
Amit
Princy
Top achievements
Rank 2
 answered on 18 Mar 2011
2 answers
215 views
I have a grid with a repeater with a checkboxlist inside.  I have no problem displaying the page, but when i try and get the value of the checkboxlist on the insert command in the code behind ... I cannot seem to get the values

here is an example of my code the only part that doesnt work is when i try an get the selected check boxes

Any ideas?

<asp:Repeater ID="rptMarkets" runat="server" DataSourceID="objMarkets">
    <ItemTemplate>
        <b>
            <%#DataBinder.Eval(Container.DataItem, "Market")%></b>
        <!-- Nested Repeater Level 2 - START -->
        <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("MarketID") %>' />
        <asp:ObjectDataSource ID="objProducts" runat="server" SelectMethod="GetProductsByMarketsID"
            TypeName="Ceradyne.clsLibrary">
            <SelectParameters>
                <asp:ControlParameter Name="MarketID" Type="Int32" ControlID="HiddenField1" PropertyName="Value" />
            </SelectParameters>
        </asp:ObjectDataSource>
         
        <ul>
            <asp:CheckBoxList ID="clProductName" runat="server" DataSourceID="objProducts" DataTextField="ProductName" DataValueField="ProductID" RepeatColumns="3" Font-Size="8px">
            </asp:CheckBoxList>
        </ul>
        <!-- Nested Repeater Level 2 - END -->
    </ItemTemplate>
    <SeparatorTemplate>
        <hr />
    </SeparatorTemplate>
</asp:Repeater>
Protected Sub RadGrid1_InsertCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.InsertCommand
    'save the file to the website
    Dim txtPDFFile As String = ""
    Dim Upload As RadUpload = TryCast(e.Item.FindControl("upBrochurePDF"), RadUpload)
    Dim BrochureFolder As String = Server.MapPath("~/uploads/brochures/")
    If Upload.UploadedFiles.Count > 0 Then
        For Each file As UploadedFile In Upload.UploadedFiles
            txtPDFFile = file.GetName()
            file.SaveAs(BrochureFolder & txtPDFFile, True)
        Next
    End If
 
    'check to see if this file name exists already
    '(not written yet)
 
 
    ' save the file name to the database
    objBrochure.AddBrochure(txtPDFFile)
 
    'look up the brochure id based on the filename
    objBrochure.GetBrochuresByFilename(txtPDFFile)
    Dim BrochureID As Integer = objBrochure.BrochureID
 
    'save the value of the check boxes
    Dim ProductID As Integer
    Dim i As Integer
    Dim List As CheckBoxList = DirectCast(e.Item.FindControl("clProductName"), CheckBoxList)
    For i = 0 To List.Items.Count - 1
        If List.Items(i).Selected = "true" Then
            ProductID = List.Items(i).Value
            'add brochure links to products
            objBrochure.AddBrochureProductLink(BrochureID, ProductID)
        End If
    Next
 
    Response.Redirect("/admin/Library/ManageBrochures.aspx")
End Sub
Michael
Top achievements
Rank 1
 answered on 18 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?