Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
872 views
I am using the RadEditor (version: 2008.3.1105.35) within the RadGrid template edit form as a model popup.

I have a client application that allows them to enter comments into the RadEditor. These comments need to be free of HTML because the data will be used with .PDF reports. The users are using all types of browsers (IE, FF, and Safari). The users are copying content from Word and from other HTML on pages and pasting it into the editor. I have the StripFormattingOptions set to "AllExceptNewLines", but it doesn't appear to be working, It appears that nothing is getting removed.

What is the correct way to configure the RadEditor to remove all HTML/MS Word formatting and only leave new lines when users paste content using IE, FF and Safari browsers?

Are there any server side methods of scrubbing/cleaning the content before it's commited to the database? Cient-side?



 

Richard Buff
Top achievements
Rank 1
 answered on 17 Feb 2010
1 answer
95 views
Hi Everyone,

I have a webpage with 3 radgrid controls.
Some values in those grids are input from the user or calculated programmatically

I am wondering if there is a way to export those 3 grids into the same pdf file?
in fact I just would like to have the webpage under a PDF format.

If not would that be possible using telerik report?

thank you

regis

Daniel
Telerik team
 answered on 17 Feb 2010
2 answers
121 views
2008 02 calenday control, In ie8, the background color is only shown in the lower 10% of the day's cell on Selection.

Thnaks
Thomas
Thomas Rozzi
Top achievements
Rank 1
 answered on 17 Feb 2010
1 answer
88 views
I probably have the regular expression set up wrong, but I am trying to set up a regular expression that checks if a password typed is between 7 and 16 characters and contains at least 1 numeric and 1 special character and not start with a digit. I tested this in some other regular expression testers and it passes, but I validation is failing when I do it with the RadInputManager.

I am using a RegExpTextBoxSetting with the following regular expression: /^(?=\D+\d)(?=.*[!@&.$#]).{7,16}$/

but the above displays a validation error even if I type a  password that is between 7 and 16 characters and contains at least 1 numeric and 1 special character.

I am new to regular expressions, so please excuse it.

Thanks,
sam
Top achievements
Rank 1
 answered on 17 Feb 2010
0 answers
114 views
Hi,

I have two comboboxes that are both reading via stored procedures to a customer table. Box 1 is Surname and simply returns all surnames in the table. Box 2 accepts the value of box 1 as an input parameter and is supposed to only return a list of first names that match the surname the user picks. I linked up the correct control to the input parameter and it compiles and runs. There are no errors but after I select a surname, the first name field is completely empty as if the parameter I passed was empty.

Does anyone have an idea of what might be wrong?

Thanks!

Hey all, please disregard this one. I'm a total newbi to AJAX and telerik. I set the combobox autopostback to true and this works fine now. I wasted a bunch of time trying to reset my stored proc parameter and it turned out to be the simplest little oversight. Oh well.
DC
Top achievements
Rank 1
 asked on 17 Feb 2010
2 answers
105 views
Hi, Gurus,

I have a problem with radgrid grouping. I need to group my data on user titles, it works fine but it looks odd after displaying shown bellowed. you can see the title always a bit higer and closed to upper dataitem. does anybody know how to fix it?

Another thing is whether I can re-format  group information without group field? eg, if I group data with 'Title' field, I want to show the real title rather than 'Title: xxxxx'.


Many thanks in advance.
Rachael L
Top achievements
Rank 1
 answered on 17 Feb 2010
1 answer
229 views
I have implemented with Silverlight and Flash a way for the user to browse select multiple files and then upload them. I like to find a way to do without using the plug-ins.
Anybody?
Right now I am using
http://demos.telerik.com/aspnet-ajax-beta/upload/examples/async/monitorprogress/defaultcs.aspx
and for the silverlight
http://demos.telerik.com/aspnet-ajax-beta/upload/examples/silverlight/defaultcs.aspx
Thanks in advance
Best regards
robertw102
Top achievements
Rank 1
 answered on 17 Feb 2010
0 answers
251 views
duplicate post...delete
Nathan
Top achievements
Rank 1
 asked on 17 Feb 2010
1 answer
106 views

I'd need an Input TextBox with the following characteristics:

- colour of the border: #ababab,
- height of the component: 22px,
- distance of the base of the text from the bottom: 5px,
- colour of the text: #333333,
- font of the text: verdana,
- size of the text: 11px.

Could you please send me the corresponding code,
(css head + html) valid for:

Internet Explorer,
Firefox,
Opera,
Safari,
Chrome?

Thank you

Alberto Bresesti

Kamen Bundev
Telerik team
 answered on 17 Feb 2010
3 answers
214 views
I have a grid inside the nestedviewtemplate of another grid.

In the commanditemtemplate i have a button for exporting the grid.

However, my header row is not displayed. I am unable to figure out why my header is not visible.

Grid declaration:

<

NestedViewTemplate>

 

 

 

 

<telerik:RadGrid ID="RadGridKeyRelation" runat="server" Visible="false" AllowPaging="true"

 

 

AllowFilteringByColumn="true" OnInit="RadGridKeyRelation_Init" OnNeedDataSource="RadGridKeyRelation_NeedDataSource" OnItemDataBound="RadGridKeyRelation_ItemDataBound"

 

 

Width="950px" AutoGenerateColumns="false" OnItemCommand="RadGridKeyRelation_ItemCommand" OnItemCreated="RadGridKeyRelation_ItemCreated" EnableLinqExpressions="false" PageSize="10" HeaderStyle-BackColor="#5297b9" HeaderStyle-BorderColor="#ffffff">

 

 

<ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="false"

 

 

FileName="RelatedContactsExport">

 

 

<Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous"

 

 

Keywords="None" PageBottomMargin="0.5in" PageLeftMargin="0.5in" PageRightMargin="0.5in" PageWidth="425mm"

 

 

PageTopMargin="0.5in" PageTitle="Grid export document" Subject="Grid Export" Title="Grid export"

 

 

PaperSize="Letter" />

 

 

</ExportSettings>

 

 

<MasterTableView TableLayout="Fixed" Name="KeyRelations" DataKeyNames="RelatedContactID, LastName, FirstName"

 

 

CommandItemDisplay="Top">

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="Name" UniqueName="KeyRelName" HeaderStyle-Width="20%"

 

 

FilterControlWidth="140px" DataField="LastName" CurrentFilterFunction="StartsWith"

 

 

ItemStyle-BackColor="#eef6f9" AutoPostBackOnFilter="true">

 

 

<ItemTemplate>

 

 

<br />

 

 

<asp:LinkButton ID="LinkButtonSpouseName" CssClass="linkButton" CommandName="ShowContact"

 

 

runat="server"><b><%# Eval("Name")%></b></asp:LinkButton>

 

 

<asp:Label ID="Label1" runat="server" CssClass="label" Visible='<%# !Convert.IsDBNull(Eval("Relationship")) %>'><br /><b>Relationship</b>:&nbsp;</asp:Label><%# Eval("Relationship")%>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Type" UniqueName="Type" HeaderStyle-Width="10%"

 

 

ItemStyle-BackColor="#eef6f9" DataField="RelationType">

 

 

<FilterTemplate>

 

 

<telerik:RadComboBox ID="RadComboBoxRelatedContacts" runat="server" AutoPostBack="true"

 

 

OnPreRender="RadComboBoxRelatedContacts_PreRender" Width="95px" OnSelectedIndexChanged="RadComboBoxRelatedContacts_SelectedIndexChanged">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Text="Family" Value="Family" />

 

 

<telerik:RadComboBoxItem Text="Business" Value="Business" />

 

 

<telerik:RadComboBoxItem Text="Personal" Value="Personal" />

 

 

<telerik:RadComboBoxItem Text="Professional" Value="Professional" />

 

 

<telerik:RadComboBoxItem Text="Colleagues" Value="Colleagues" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

 

</FilterTemplate>

 

 

<ItemTemplate>

 

<%

# Eval("RelationType")%>&nbsp;

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Phone" UniqueName="Phone" HeaderStyle-Width="21%"

 

 

ItemStyle-BackColor="#eef6f9" AllowFiltering="false">

 

 

<ItemTemplate>

 

<%

# Eval("Phone")%>&nbsp;

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Remarks" UniqueName="Remarks" HeaderStyle-Width="10%"

 

 

ItemStyle-BackColor="#eef6f9" FilterControlWidth="75px" DataField="Remarks" AllowFiltering="false">

 

 

<ItemTemplate>

 

<%

# Eval("Remarks")%>&nbsp;

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

<CommandItemTemplate>

 

 

<asp:LinkButton ID="LinkButtonExportKeyRel" runat="server" CommandName="Export" OnClick="LinkGridRelatedContactPrint_OnClick"

 

 

CausesValidation="false" Text="Export" ForeColor="Black"></asp:LinkButton>&nbsp;

 

 

</CommandItemTemplate>

 

 

<PagerStyle Position="TopAndBottom" PrevPageText="Prev" NextPageText="Next" />

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 



.cs code for export

protected

void LinkGridRelatedContactPrint_OnClick(object sender, EventArgs e)

 

{

 

foreach (GridNestedViewItem item in RadGridContact.MasterTableView.GetItems(Telerik.Web.UI.GridItemType.NestedView))

 

{

 

RadGrid gridKeyRel = (RadGrid)item.FindControl("RadGridKeyRelation"); 

 

gridKeyRel.Rebind();

FormatGridExport(gridKeyRel);

 

gridKeyRel.MasterTableView.ExportToPdf();

}

}


I am also unable to put any formatting on the pdf export.

 

private

void FormatGridExport(RadGrid grid)

 

{

 

foreach(GridHeaderItem headerItem in grid.MasterTableView.GetItems(Telerik.Web.UI.GridItemType.Header))

 

{

 

 

headerItem.Style[

"font-size"] = "6pt";

 

headerItem.Style[

"color"] = "#ffffff";

 

headerItem.Style[

"background-color"] = "#003e7e";
headerItem.Style["vertical-align"] = "middle";

 

 

foreach (TableCell cell in headerItem.Cells)

 

{

cell.Style[

"font-family"] = "Tahoma";

 

cell.Style[

"text-align"] = "center";

 

cell.Style[

"font-weight"] = "normal";

 

cell.Style[

"border-color"] = "#003e7e";

 

}

 

}

 

foreach (Telerik.Web.UI.GridItem dataItem in grid.MasterTableView.GetItems(Telerik.Web.UI.GridItemType.Item))

 

{

 

 

foreach (TableCell cell in dataItem.Cells)

 

{

cell.Style[

"font-family"] = "Tahoma";

 

cell.Style[

"text-align"] = "center";

 

cell.Style[

"color"] = "#898a8c";

 

cell.Style[

"font-size"] = "5.5pt";}

 

}

}

What am I doing wrong here?

Daniel
Telerik team
 answered on 17 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?