Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
154 views

Hi there

 

We’re pretty new to RadEditor, however, we’re seeing some inconstancies when pasting plain text paragraphs into the editor.

 

Anyway, sometimes when I paste (ctrl v paste) three plain text paragraphs  the resulting HTML paras will be wrapped in <p> tags, some times there will be no <p> tags and the lines will be separated with <br /> tags and sometimes one paragraph will have <p>’s and another will not.

 

I’m assuming there is a setting I can configure to produce consistent results?!

 

Historically clients have a habit of messing up the formatting when using Rich Text editors so our advise is always ‘paste to plain text then paste to the editor’, hence the question.

 

Many thanks

 

Stephen


Rumen
Telerik team
 answered on 31 Jul 2009
11 answers
139 views
Hello,
I want to avoid displaying the navigateurl when mouse is over a menuitem (or RadPanelBarItem) and I try to use, as explained in doc the OnClientMouseOver and OnClientMouseOut
client messages to trigger a javascript displying the menuItem Text as

function OnClientMouseOver(panelbar, args)   
{  
    window.status  =   args.get_item().get_text();   
} 

but it has no effect: still the href of anchor is displayed.
Is there some security trick  or a bug in my code ? when I insert alert, I really get correct text.

Notice that I think this should be an option for radMenu and RadPanelBar ?
Thanks for help.


CS
Paul
Telerik team
 answered on 31 Jul 2009
1 answer
107 views

We are trying to use the RadPanelBar to create an FAQ.  The result intended would have the question in the in the panel bar and when you click on it, the answer is shown in the expanded section.  In the answer we also want to have some ‘See also’ questions that would be also be panel items that can be expanded to show the answer.  We are running into a problem on expanding the ‘See Also’ answers.  When we click on the ‘See Also’ answer, the JavaScript error “this.getLinkElement() is null or not an object” occurs.  The generation of the RadPanelBar is all generated in the code-behind.  The code is as follows:

 

HTML

            <td>

                <telerik:RadPanelBar ID="TestPanelBar" runat="server" Width="100%" Height="100%" Style="white-space: normal" ExpandMode="SingleExpandedItem" AllowCollapseAllItems="true" EnableEmbeddedSkins="false">

                </telerik:RadPanelBar>

            </td>

 

 

Code- Behind

 

            for (int i = 0; i < 10; i++)

            {

                Telerik.Web.UI.RadPanelItem questionItem = new Telerik.Web.UI.RadPanelItem(string.Format("{0} Question", i.ToString()));

                Telerik.Web.UI.RadPanelItem answerItem = new Telerik.Web.UI.RadPanelItem();

                answerItem.Controls.Add(new Label() { Text = "this is the answer" });

 

                for (int j = 0; j < 3; j++)

                {

                    Telerik.Web.UI.RadPanelItem relatedQuestionItem = new Telerik.Web.UI.RadPanelItem(string.Format("See Also {0}", j.ToString()));

                    Telerik.Web.UI.RadPanelItem relatedAnswerItem = new Telerik.Web.UI.RadPanelItem();

 

                    relatedQuestionItem.Width = Unit.Percentage(95);

                    relatedAnswerItem.Width = Unit.Percentage(95);

 

 

                    Label answerLabel = new Label();

                    answerLabel.Text = string.Format("See Also Answer {0}", j.ToString());

                    relatedAnswerItem.Controls.Add(answerLabel);

 

                    relatedQuestionItem.Items.Add(relatedAnswerItem);

                    answerItem.Items.Add(relatedQuestionItem);

 

                }

 

                answerItem.Expanded = true;

 

                questionItem.Items.Add(answerItem);

 

                TestPanelBar.Items.Add(questionItem);

                TestPanelBar.Width = Unit.Percentage(100);

            }

 

            TestPanelBar.Items[0].Expanded = true;

 

 

The exact line of code that is causing the problem is relatedAnswerItem.Controls.Add(answerLabel);.  As soon as we add a control to the RadPanelItem, this error occurs.

 

Is there a way to add a control (note we are adding a user control, not a label, the code is above is so you can reproduce the error) to a RadPanelItem and still be able to add a ‘sub’ item.  Or do you have another suggestion how to accomplish this.

Paul
Telerik team
 answered on 31 Jul 2009
1 answer
90 views
Folks,

Here is the Scenario.

I have a Master Page (Main.Master) and 2 Content Pages(Default & Default1.aspx). Master Page page has Company Header Logo and Other controls that are common to both .aspx Pages.. When I add both .aspx pages in the Project, I indicated Main.Master is their Master Page.

I have  Link Buttons controls in Both Pages for Navigation Purposes. For Default.aspx Link1 Button On Click Event, Resonse.redirect("Default1.aspx") and Vice Versa.

My question is there any sample site or example in Radcontrols for Asp.Net Ajax to accomplish the Task? That will be appreciated.. I looked at Live Demos/Menu/Examples/Functionality/Templates/DefaultVB.aspx, tried to implement in Master Page. But the problem is that If I click the content pages Navigation Buttons, I loose my Master Page header contents (TEMPLATES logo in this example). I do not want to loose the header content of my Master Page, I want to retain them as I navigate between content pages.   In the Past, I did this type of Job via SiteMapDataSource but did not find any samples in so far in Rad Contols..I am using RadControls for ASP.NET AJAX Q2 2009.

Thanks

Ghulam

Paul
Telerik team
 answered on 31 Jul 2009
1 answer
229 views
Hello Team,

I am having a grid with template column and having two data field to be displayed in it like
  <telerik:GridTemplateColumn DataField="Subject"  HeaderText="Coaching Activities & Relationship" 
                            UniqueName="Subject" SortExpression="Subject" FilterControlWidth="95%" AutoPostBackOnFilter="true"  CurrentFilterFunction="Contains" > 
                             <HeaderStyle HorizontalAlign="Center" Width="300px"  /> 
                            <ItemStyle HorizontalAlign="left" Width="300px" /> 
                            <ItemTemplate> 
                                <b> 
                                    <asp:Label ID="lblSubject" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Subject") %>'></asp:Label><br /> 
                                </b> 
                                <asp:Label ID="lblNoteDetail" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.NoteDetail") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
I need the filter for both the data field with single text box,
Please let me know if you have any way for this.

Thanks
Amol
Princy
Top achievements
Rank 2
 answered on 31 Jul 2009
4 answers
233 views
Hi,

since the chart (and was it doe's with visual studio) almost drives me crazy - I have a simple question.
I simply want to change the color of the text showing the value to black.
I could manage it to set the "Label (DataLabel) color" but I can't find a way to change the color of the "value" shown on top of the bar.
I really hope this needs no code behind :)

My chart looks like this (at least when it doesn't change by itself :)):
        <telerik:RadChart ID="rcGespraechsAuswertung2" runat="server" Width="910px" Height="500px" IntelligentLabelsEnabled="False" DataSourceID="SqlDataSource1" AutoLayout="true" Legend-Appearance-Visible="false" SeriesOrientation="Horizontal">  
            <Appearance> 
                <FillStyle MainColor="255, 255, 220" FillType="Solid">  
                </FillStyle> 
                <Border Color="103, 136, 190" /> 
            </Appearance> 
            <PlotArea> 
            <Appearance> 
                <FillStyle MainColor="255, 255, 220" FillType="Solid">  
                </FillStyle> 
                <Border Color="149, 184, 206" /> 
            </Appearance> 
                <XAxis DataLabelsColumn="Beschr">  
                    <Appearance TextAppearance-TextProperties-Color="Black" Color="Black" MajorTick-Color="165, 190, 223">  
                        <MajorGridLines Color="165, 190, 223" /> 
                    </Appearance> 
                </XAxis> 
                <YAxis AxisMode="Normal">  
                    <Appearance TextAppearance-TextProperties-Color="Black" Color="Black" MajorTick-Color="165, 190, 223" MinorTick-Color="165, 190, 223">  
                        <MajorGridLines Color="165, 190, 223" /> 
                        <MinorGridLines Color="165, 190, 223" Width="0" /> 
                    </Appearance> 
                </YAxis> 
            </PlotArea> 
            <ChartTitle> 
                <Appearance Dimensions-Width="900px" Dimensions-Margins="3px, 0px, 0px, 0px" Dimensions-Paddings="0,0,0,0">  
                </Appearance> 
                <TextBlock Text="Gesprächsauswertung">  
                    <Appearance TextProperties-Color="Black" TextProperties-Font="Arial, 12pt, style=bold" Dimensions-Width="870px" Dimensions-Height="24px" Dimensions-AutoSize="false" Dimensions-Paddings="3,3,0,0">  
                    <FillStyle MainColor="#859bbc" FillType="Solid" /> 
                    </Appearance> 
                </TextBlock> 
            </ChartTitle> 
        </telerik:RadChart> 
 
By the way - this "Color=Black" has no effect - it was just a try to change this text.
And what I mean about "if it does not change by itself" - I swear the thing is horrible.
I'll prepare a short video to show what I mean.

But my only problem is the color or this value text.

Regards

Manfred
PS: the spellchecker seems to be brocken here in the forums...
ManniAT
Top achievements
Rank 2
 answered on 31 Jul 2009
4 answers
391 views
Hi,

I have a master / detail grid and do some customization in PreRender.
First - hide the expand collapse column on expanded rows.
Give the TD holding the details table a CssClass
Suggestion: it would be much easier for customization if you could give this TD a css-class.

Anyhow - since I hide the first TD (expand collapse) the second TD must span one column more.
I tried this with increment - and (since it did not work) with a constant value.
But the setting is ignored - when I look the rendered HTML the colspan is like it was (no matter what I set in code behind).

Here my code:
protected void rgJugendliche_PreRender(object sender, EventArgs e) {  
    if (!IsPostBack) {  
        foreach (GridNestedViewItem nVI in rgJugendliche.MasterTableView.GetItems(GridItemType.NestedView)) {  
            if (nVI.NestedTableViews.Length > 0) {  
                TableCell tC = nVI.Controls[0] as TableCell;  
                tC.BackColor = Color.FromArgb(1,0xcd,0xff,0xb1);  
                tC.Visible = false;  
                tC = nVI.Controls[1] as TableCell;  
                tC.ColumnSpan = 11;  
                tC.CssClass += " BorderTopBottom";  
            }  
        }  
    }  
}  
 
11 was just a try - the "default" is 9 - 10 should be what I set - but I can do what I want - it stays 9.

Regards

Manfred
ManniAT
Top achievements
Rank 2
 answered on 31 Jul 2009
1 answer
144 views
hi ,

I am new to MVC,

I am going to use Telerik into MVC ,

I need some of sample applications for how to use Telerik controls into MVC especially controls like Grid,..etc.


Thank you in advance
Paul
Telerik team
 answered on 31 Jul 2009
1 answer
101 views
Do any of the RAD AJAX controls use ATL? I am pretty sure they do not as Microsoft mentions ActiveX in the security bulletin but I need to be sure. I am using v4.1.1.0 of the RadChart and v7.3.1.0 of the RadEditor on a few different sites.

Thanks in advance.
Paul
Telerik team
 answered on 31 Jul 2009
4 answers
160 views
Hi,

I have a detail table which's columns are defined like this.
<Columns> 
    <telerik:GridTemplateColumn DataField="Datum" DataType="System.DateTime" HeaderText="Datum" SortExpression="Datum" UniqueName="Datum" HeaderStyle-Width="105px" > 
        <ItemTemplate> 
            <%#((DateTime)Eval("Datum")).ToShortDateString() + " (" + Eval("Dauer") + "h)" %> 
        </ItemTemplate> 
    </telerik:GridTemplateColumn> 
    <telerik:GridTemplateColumn DataField="SettingID" DataType="System.Int32" HeaderText="Setting" SortExpression="SettingID" UniqueName="SettingID" HeaderStyle-Width="90px" > 
        <ItemTemplate> 
            <cc:DataSelectLabel runat="server" Width="85px" DataSourceID="odsSettings" DataTextField="Name" DataValueField="ID" SelectedValue='<%# Eval("SettingID") %>' /> 
        </ItemTemplate> 
    </telerik:GridTemplateColumn> 
    <telerik:GridDropDownColumn DataField="NationID" DataType="System.Int32" HeaderText="Nation" SortExpression="NationID" UniqueName="NationID" DataSourceID="odsNationen" ListTextField="Name" ListValueField="ID" HeaderStyle-Width="130px">  
    </telerik:GridDropDownColumn> 
    <telerik:GridDropDownColumn DataField="WohnsituationID" DataType="System.Int32" HeaderText="Wohnsituation" SortExpression="WohnsituationID" UniqueName="WohnsituationID" DataSourceID="odsWohnsituationen" ListTextField="Name" ListValueField="ID" HeaderStyle-Width="135px">  
    </telerik:GridDropDownColumn> 
    <telerik:GridDropDownColumn DataField="WohngegendID" DataType="System.Int32" HeaderText="Wohngegend" SortExpression="WohngegendID" UniqueName="WohngegendID" DataSourceID="odsWohngegenden" ListTextField="Name" ListValueField="ID" HeaderStyle-Width="165px">  
    </telerik:GridDropDownColumn> 
    <telerik:GridTemplateColumn DataField="BerufssituationID" DataType="System.Int32" HeaderText="Berufssituation" SortExpression="BerufssituationID" UniqueName="BerufssituationID"  HeaderStyle-Width="155px">  
        <ItemTemplate> 
            <cc:DataSelectLabel runat="server" DataSourceID="odsBerufssituationen" DataTextField="Name" DataValueField="ID" SelectedValue='<%# Eval("BerufssituationID") %>' /> 
        </ItemTemplate> 
 
    </telerik:GridTemplateColumn> 
    <telerik:GridTemplateColumn DataField="Anmerkung" HeaderText="Anmerkung" SortExpression="Anmerkung" UniqueName="Anmerkung" HeaderStyle-Width="100px">  
        <ItemTemplate> 
            <asp:HyperLink ID="hlDetails" runat="server" NavigateUrl="#" Text='<%#((bool)(Eval("Anmerkung").ToString().Length > 12)) ? Eval("Anmerkung").ToString().Substring(0, 12) + "..." : ((bool)(Eval("Anmerkung").ToString().Length ==0)) ? "DETAILS" : Eval("Anmerkung")%>'></asp:HyperLink> 
        </ItemTemplate> 
    </telerik:GridTemplateColumn> 
</Columns 
The width of the details view is set to 880px.
In IE 8 and FF 3.0.11 this works as expected.

I made an image of all three situations. http://www.pp-p.net/images/allcols.png
As you can see Top == IE - Bottom == FF and Middle == Safari - IE and FF are (except one or two pixels) the same.
By the way - the layout does not really change in safari if I (for an example) change the width of the first column.

My customer uses a lot of mac's so this is a situation which make really troubles.

Regards

Manfred
ManniAT
Top achievements
Rank 2
 answered on 31 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?