Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
225 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
375 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
136 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
100 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
153 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
1 answer
241 views
Hello people,

I'm using the RadListBox for the first time. I used a custom item template as I want a radio button and text in each list item.
I bound data to the listbox in the code behind. This works fine.

I've allowed re-ordering and enabled drag and drop.

When I re-order an item either via drag and drop or via the reorder buttons the reordered item loses it's itemtemplate settings. ie. the radio button disappears and only the text is left.

Unfortunately the Telerik examples demonstrate either reordering or using a template but not both. Am I doing something wrong? A simple example would be useful.

Thanks.
Genady Sergeev
Telerik team
 answered on 31 Jul 2009
1 answer
134 views
Hey,

I am trying to use a hyperlink to update a DateTimePicker via javascript.  I saw a limited number of methods that you can use in javascript to interact with a DateTimePicker but not one that will let me set the input spot.  Can you help me out please?


Kyle
Shinu
Top achievements
Rank 2
 answered on 31 Jul 2009
1 answer
73 views
I am brand new to the telerik controls so this my be very simple.

I have created a context menu that will open anywhere in the document when text is selected.  The text that is selected will be used in the context menu to replace the text of a few items that have [Selection] in their text.

All of this is working the problem I am having is getting the selection text when the user clicks on a menu item and a postback occurs.  Is this possible?

        <script type="text/javascript">
            function getSelText() {
                var txt = '';
                if (window.getSelection)
                    return window.getSelection();
                else if (document.getSelection)
                    return document.getSelection();
                else if (document.selection)
                    return document.selection.createRange().text;
                else 
                    return new String("");
            }
            function onClientShowingHandler(sender, eventArgs){
                var cancel = (getSelText().length == 0);
                eventArgs.set_cancel(cancel);
                if (!cancel) {
                    var selection = getSelText();
                    sender.set_clientState(selection);
                    var items = sender._getAllItems();
                    for (var i = 0; i < items.length; i++) {
                        items[i].set_text(items[i].get_text().replace("[Selection]", selection));
                    }
                }
            }
        </script> 
        <telerik:RadContextMenu ID="RadContextMenu1" 
            OnClientShowing="onClientShowingHandler"
            OnItemClick="RadContextMenu1_OnItemClick"
            CollapseAnimation-Type="None" ExpandAnimation-Type="None" runat="server">
            <Targets>
                <telerik:ContextMenuDocumentTarget />
            </Targets>
            <Items>
                <telerik:RadMenuItem Text="[Selection] is a Manufacturer" Value="Manufacturer" />
                <telerik:RadMenuItem Text="[Selection] is a Vendor" Value="Vendor" />
                <telerik:RadMenuItem Text="Copy" />
            </Items>
        </telerik:RadContextMenu>
Veselin Vasilev
Telerik team
 answered on 31 Jul 2009
3 answers
210 views
I am trying to open an external website in a new windows using RadMenu control and sitemap file. I use target="_blank" to open
the site in a new windows but it does not work for me:
for example  I want to link to telerik website like this:

<

 

siteMapNode url="~/Home.aspx" resourceKey="Home" />  

 

 

<

 

siteMapNode url="~/Contact.aspx" resourceKey="contact" />  

 

<

 

siteMapNode title="Telerik" url="http://www.telerik.com" target ="_blank"  roles="*"/>


This does not open a new windows.

Thanks for your help

Rao

 

 

 

 

 

Kamen Bundev
Telerik team
 answered on 31 Jul 2009
2 answers
66 views
I'm trying to make a horizontal bar using RadChart Q3 2008 and I've gotten it to look and behave how I would like it but I'm having problems with the rendered image having a bunch of whitespace around it.  I basically want to trim all the excess whitespace from top and bottom, left and right out of the image.  I spent hours fiddling with all of the different properties but can't figure out how.  Any help would be appreciated.  Here is the the code for the chart:

<telerik:radchart id="RadChart1" skinsoverridestyles="false" runat="server" borderwidth="0"
                charttitle-visible="false" seriesorientation="Horizontal" backcolor="white" height="55px"
                width="530px">
                <Appearance  Border-Visible="false"  />
                <PlotArea>
                    <Appearance FillStyle-MainColor="white"  FillStyle-FillType="Solid" border-width="0" Dimensions-AutoSize="true" />
                    <YAxis MaxValue="100" MinValue="0" Step="1" AxisMode="Normal" AutoScale="false" visible="false" />
                    <XAxis Visible="false"/>
                </PlotArea>
                <Series>
                    <telerik:ChartSeries Type="stackedbar" DefaultLabelValue="#Y% Completed">
                        <Appearance LegendDisplayMode="Nothing"  TextAppearance-TextProperties-Color="white" >
                            <FillStyle MainColor="Green" SecondColor="LightGreen"   FillSettings-GradientMode="Horizontal"/>
                        </Appearance>
                        <Items>
                            <telerik:ChartSeriesItem  yvalue="57" />
                        </Items>
                    </telerik:ChartSeries>
                    
                    <telerik:ChartSeries Type="stackedbar" >
                        <Appearance LegendDisplayMode="Nothing"  LabelAppearance-Visible="false">
                            <FillStyle MainColor="#FF7878" FillType="Solid"  />
                        </Appearance>
                        <Items>
                            <telerik:ChartSeriesItem  yvalue="100" />
                        </Items>
                    </telerik:ChartSeries>
                </Series>
            </telerik:radchart>
Erin
Top achievements
Rank 1
 answered on 31 Jul 2009
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?