Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
123 views
I am about to add RadEditor to a page we use for creating a mail message.

The user wants to be able to generate HTML mail but also wants the Outlook-like ability to choose to send plain text mail.

My plan is to add a custom dropdown to the Editor toolbar to allow the user to choose the format and then modify the tools available in toolbar to an appropriate set dependent on the option chosen.

What I then need to do, if the user has selected Plain Text, is remove any formating that is inappropriate.

Looking at the functinality available in the radEditor demos, I can make a few calls to the Format Stripper to remove CSS, Font, Span and Word formating but I still need to remove any <a> tags.

I guess I need to leave any <p> and <br> tags 'til after the user has finished composing the message or else it's going to be just one big block of text.

Whilst I know that I could remove the <a> tags at the same time that I do the post-processing to convert the <p> and <br> tags the LFCR in the sent message, I'd prefer to do it in the editor so the user can see that tghere are no links in their message.

So, to my point. is there an example somewhere of code I can use to process the message to remove a set of tags? Or should I just discover a method of sucking out the editor's content, throw it at the HTML Agility Pack to process it and then put it back?

Or, better yet, is there an example of switching from full HTML editing to plan text already someplace?

--
Stuart (Founder member of LazyProgrammersRUs)
Stuart Hemming
Top achievements
Rank 2
 answered on 27 Feb 2012
5 answers
161 views
I upgraded Visual Studio 2010 RC to the final released version. Now when I open up a project for .NET 3.5, the toolbox shows radControls for .NET 4.0. If I click on show all in the toolbox then the radControls for .NET 3.5 is listed but it is dimmed out. How can I make the radControls for NET 3.5 show up for a .NET 3.5 project?
Andrey
Telerik team
 answered on 27 Feb 2012
2 answers
137 views
 Hello,

I'm trying to use the component RadTreeList and It works well !
I've just a small problem with the oRecordsTemplate. (see attached file image002.jpg). It generates two lines. Even when I try my own template.
Perhaps is ther something I'm doing wrong. The TreeList is generated dynamically in Page_Init().

Thanks for your help.
Regards
Bernard

protected void Page_Init()
        {
aRadTreeList = new RadTreeList();
            //aRadTreeList.NoRecordsTemplate = new XarcNoRecordsTemplate();
            aRadTreeList.ClientSettings.Scrolling.AllowScroll = true;
            aRadTreeList.ClientSettings.Scrolling.UseStaticHeaders = true;
            aRadTreeList.AutoGenerateColumns = false;
            aRadTreeList.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(180);
            aRadTreeList.ClientSettings.Scrolling.SaveScrollPosition = true;
            TreeListBoundColumn aTreeListBoundColumn = new TreeListBoundColumn();
            aTreeListBoundColumn.DataField = @"id";
            aTreeListBoundColumn.UniqueName = @"id";
            aTreeListBoundColumn.HeaderText = @"ID";
            aRadTreeList.Columns.Add(aTreeListBoundColumn);
            TreeListImageColumn aTreeListImageColumn = new TreeListImageColumn();
            aTreeListImageColumn.UniqueName = @"imageColumn";
            aTreeListImageColumn.HeaderText = @"Type";
            aTreeListImageColumn.ImageUrl = @"~/images/excel.png";
            //aTreeListImageColumn.ImageWidth = Unit.Pixel(20);
            //aTreeListImageColumn.ImageHeight = Unit.Pixel(20);
            aRadTreeList.Columns.Add(aTreeListImageColumn);
            aTreeListBoundColumn = new TreeListBoundColumn();
            aTreeListBoundColumn.DataField = @"name";
            aTreeListBoundColumn.UniqueName = @"name";
            aTreeListBoundColumn.HeaderText = @"Nom";
            aRadTreeList.Columns.Add(aTreeListBoundColumn);
            string[] aStringArr = new string[1];
            aStringArr[0] = @"id";
            aRadTreeList.DataKeyNames = aStringArr;
            aRadTreeList.ClientDataKeyNames = aStringArr;
            aStringArr = new string[1];
            aStringArr[0] = @"idPere";
            aRadTreeList.ParentDataKeyNames = aStringArr;
            aRadTreeList.NeedDataSource += new EventHandler<TreeListNeedDataSourceEventArgs>(RadTreeList_NeedDataSource);
            aRadTreeList.ItemDataBound += new EventHandler<TreeListItemDataBoundEventArgs>(RadTreeList_ItemDataBound);
            aRadTreeList.ClientSettings.ClientEvents.OnItemDblClick = @"ItemDblClick";
            aRadTreeList.Width = Unit.Percentage(100);
            RadTreeListDocDiv.Controls.Add(aRadTreeList);
 }
Bernard
Top achievements
Rank 1
 answered on 27 Feb 2012
2 answers
84 views
is it possible to have a loadingpanel in a radslidingpane activated by a button in the radslidingpane while trying to load a radgrid?

I've tried all sorts of things and have been unsuccessful.

thanks
Steven
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
254 views
I have a RadGrid that shows or hides data in a certain row based on some logic in my RadGrid1_ItemDataBound method. 

I am trying to show the column and only certain rows on the export.

RadGrid
First Name   MVP
Fred             Yes
John             No
Bill
Stan             Yes
Jack             Yes

Export to Excel
First Name   MVP
Fred             Yes
John             No
Bill                Yes
Stan             Yes
Jack             Yes

As you can see I can hide "Yes" in the codebehind of the RadGrid1_ItemDataBind method, but it appears in the Export.

How can I get "Yes" to NOT appear in the export to excel?

protected void ButtonExcel_Click(object sender, System.EventArgs e)
   {
      ConfigureExport();
      RadGrid Grid1 = (RadGrid)Page.Master.FindControl("Main").FindControl("RadGrid1");
      Grid1.MasterTableView.GetColumn("mvp").Display = true;
      // Logic here to hide certain data in the based on the MVP value
      Grid1.MasterTableView.ExportToExcel();
   }


Richard
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
124 views
Hi,
In my page I have used radtextbox to input password. I used code below
<telerik:RadTextBox ID="radtextbox1" runat="server" Width="400px"  TextMode="Password" >
</telerik:RadTextBox>
when using telerik 2009, the width is showing correctly, but when i changed to telerik Q1 2012,I cannot set the width when textmode is password.
Is there any solution for this?
Thanks in advance.
Bozhidar
Telerik team
 answered on 27 Feb 2012
1 answer
114 views
hi

Is it possible to show only month or year for the date navigation?

I want to navigate by month or year only without showing the calendar. Thanks a lot
Peter
Telerik team
 answered on 27 Feb 2012
1 answer
113 views
I have two RadCalendars inside a <div>. I want to be able to hide/show this div with jQuery, however anytime the <div> is shown/hidden the controls are causing a postback, which resets the state of the calendars. This even though the AutoPostBack property is set to "false" (both in the .aspx attribute, and Page_Load of code-behind. WHY? And how can I stop this behavior?

<div id="calendars" style="width: 450px" >
    <div style="float: left">
        <telerik:RadCalendar ID="dpStart" runat="server" AutoPostBack="false"
                                             UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" EnableMultiSelect="False"
                                             ShowFastNavigationButtons="False" ShowRowHeaders="False"
                                             RangeMaxDate="2050-12-31" RangeMinDate="2008-01-01" FocusedDate="2008-01-01"
                                             SelectedDate="" Skin="Metro" ViewSelectorText="x" >
                            <ClientEvents OnDateSelected="dpStart_OnDateSelected" OnCalendarViewChanging="OnCalendarViewChanging" />
                        </telerik:RadCalendar>
                    </div>
 
                    <div style="float: right">
                        <telerik:RadCalendar ID="dpEnd" runat="server" AutoPostBack="false"
                                             UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" EnableMultiSelect="False"
                                             ShowFastNavigationButtons="False" ShowRowHeaders="False"
                                             RangeMaxDate="2050-12-31" RangeMinDate="2008-01-01" FocusedDate="2008-01-01"
                                             SelectedDate="" Skin="Metro" ViewSelectorText="x" >
                            <ClientEvents OnDateSelected="dpStart_OnDateSelected" OnCalendarViewChanging="OnCalendarViewChanging" />
                        </telerik:RadCalendar>
     </div>
</div>
 
 <button id="button">Toggle</button>
 
<script type="text/javascript">
    $("#button").click(function() {
        $("#calendars").toggle();
     });
</script>
Vasil
Telerik team
 answered on 27 Feb 2012
0 answers
101 views
I have a panel bar that has multiple RadPanelItem.    Within one of the RadPanelItem I have 8 items.  When I put my mouse over the first item and work my way down each item's background color changes except the 8th one.  The background color of the 7th item stays changed but the 8th one never changes.

I'm using 2012 Q1 Net 35.  I'm running this on a test server with no way to post a link to view the behavior.  The other RadPanelItem do not have as many and I have not encounter this issue with any other one.

Thank you
jerry
Top achievements
Rank 1
 asked on 27 Feb 2012
7 answers
154 views
How can I disable the buttons clientside until an xmlhttpcallback has completed?

...I know how to do the callback :), the question is, does a clientside function exist to disable them?
Genady Sergeev
Telerik team
 answered on 27 Feb 2012
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?