Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
i have created a chart with 6 series with gray skin with the wizard
the renderd colors are form buttom to top:
* blue
* green
* light gray
* gray
* dark gray
* orange
When i look to the series i can't find blue and green. There are no gradients for this colors too.
I want to change the order of the colors via code. See code at the end. Wenn i make this changes in order i get the following colors:
* gray
* orange
*gray
*gray
*gray    (this should be blue)
*gray    (this should be green)
When i look tho the code, i do not wonder, because the defination is realy gray. But when i don't change the orde green and blue is renderd.
Can you give me the defination of this green and blue (gradient) color please.

thanks
thomas

 

<telerik:RadChart ID="rctElectricityMix" runat="server"

 

 

DataSourceID="SqlDataSourceChart" DefaultType="StackedBar"

 

 

Skin="Gray" Width="245px" Height="390px">

 

 

<Series>

 

 

<telerik:ChartSeries Name="SolidFuels" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle MainColor="164, 164, 164">

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Oil" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle MainColor="108, 108, 108">

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Gas" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient" MainColor="79, 79, 79">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="234, 234, 234" />

 

 

<telerik:GradientElement Color="222, 222, 222" Position="0.5" />

 

 

<telerik:GradientElement Color="197, 197, 197" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Nuclear" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="191, 191, 191" />

 

 

<telerik:GradientElement Color="165, 165, 165" Position="0.5" />

 

 

<telerik:GradientElement Color="Gray" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Renewables" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="150, 150, 150" />

 

 

<telerik:GradientElement Color="117, 117, 117" Position="0.5" />

 

 

<telerik:GradientElement Color="92, 92, 92" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

<telerik:ChartSeries Name="Other" Type="StackedBar">

 

 

<Appearance>

 

 

<FillStyle FillType="ComplexGradient">

 

 

<FillSettings>

 

 

<ComplexGradient>

 

 

<telerik:GradientElement Color="245, 100, 50" />

 

 

<telerik:GradientElement Color="248, 133, 92" Position="0.5" />

 

 

<telerik:GradientElement Color="252, 151, 116" Position="1" />

 

 

</ComplexGradient>

 

 

</FillSettings>

 

 

</FillStyle>

 

 

<LabelAppearance Visible="False">

 

 

</LabelAppearance>

 

 

<TextAppearance TextProperties-Color="90, 90, 90">

 

 

</TextAppearance>

 

 

<Border Color="200, 200, 200" />

 

 

</Appearance>

 

 

</telerik:ChartSeries>

 

 

</Series>

 

 

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

 

{

 

if (chart.Series[i] != null)

 

{

 

//chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add();

 

 

 

 

 

switch (i)

 

{

 

case 2: // solid fuels

 

 

 

 

chart.Series[i].Appearance.FillStyle.MainColor = System.Drawing.

Color.FromArgb(164, 164, 164);

 

 

break;

 

 

case 3: // oil

 

 

 

 

chart.Series[i].Appearance.FillStyle.MainColor = System.Drawing.

Color.FromArgb(108, 108, 108);

 

 

break;

 

 

case 4: // gas

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

chart.Series[i].Appearance.FillStyle.MainColor = System.Drawing.

Color.FromArgb(79, 79, 79);

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(234, 234, 234), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(222, 222, 222), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(197, 197, 197), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

 

break;

 

 

case 5: // nuclear

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(191, 191, 191), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(165, 165, 165), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromName("Gray"), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

 

 

break;

 

 

case 0: // renewables

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(150, 150, 150), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(117, 117, 117), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(92, 92, 92), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

 

 

break;

 

 

case 1: // other

 

 

 

 

chart.Series[i].Appearance.FillStyle.FillType = Telerik.Charting.Styles.

FillType.ComplexGradient;

 

gradient =

new GradientElement(System.Drawing.Color.FromArgb(237, 130, 3), 0.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(239, 149, 43), 0.5f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

gradient =

new GradientElement(System.Drawing.Color.FromArgb(241, 172, 91), 1.0f);

 

chart.Series[i].Appearance.FillStyle.FillSettings.ComplexGradient.Add(gradient);

chart.Series[i].Appearance.Border.Color = System.Drawing.

Color.FromArgb(192, 123, 41);

 

 

break;

 

}

}

}

Yavor
Telerik team
 answered on 16 Sep 2010
1 answer
187 views
Hello,
I'm using the latest RadSpell and the ControlsToCheck property.  All works fine except when I try to manually change the word in the rad spell "Not in Dictionary" text box.  The steps to produce are as follows: 1) I click Spell check, 2) I click in the "Not in Dictionary" rad text box to fix the word. 3) I fix the word manually and click change. I then get a java script error:

htmlfile: Unexpected call to method or property access.  It breaks on the following line of script code: 
if( c&&!e.get_editMod()) (var d=function() 
(e.get_textContainer().scrollTop=c.offsetTop; c.focus();


Setting the focus (c.focus();)  is where it breaks.  Running in release mode this wiil erase any text in the rad spell check text box.  In debug I get the above error.  Any insight would help.
Thanks,
Pete

P.S. I should mention that I'm not checking RadText Box controls here. Only asp text boxes. thanks.
Rumen
Telerik team
 answered on 16 Sep 2010
1 answer
132 views
Hello!

In ItemDataBound event I have:
Dim header As GridHeaderItem = DirectCast(e.Item, GridHeaderItem)
       ' to set the height of the Grid Header
       header.Height = Unit.Pixel(20)
 
       ' to add an Image in the Grid Header
       Dim img As New ImageButton()
       img.ID = "imgCit"
       img.ImageUrl = "~/images/cit.png"
       header("cit_count").Controls.Add(img)
   End If

How can I now enable sorting?


Princy
Top achievements
Rank 2
 answered on 16 Sep 2010
1 answer
198 views
Hi
I have a Client-side binding like in the Telerik Samples to a WebService which returns something like

{"d":[
{"__type":"Customer",   "CustomerID":40,  "Name":"Paul"     ,"Phone":92163   ,"Child":{ "Name":"Ging"    ,"ChildID":100 }     },
{"__type":"Customer",   "CustomerID":41,  "Name":"Peter"    ,"Phone":91981   ,"Child":{ "Name":"Gong"   ,"ChildID":101 }     },
{"__type":"Customer",   "CustomerID":42,  "Name":"Phil"       ,"Phone":92139   ,"Child":{ "Name":"Ping"     ,"ChildID":102 }     },
{"__type":"Customer",   "CustomerID":43,  "Name":"Phong"   ,"Phone":92137   ,"Child":{ "Name":"Pong"    ,"ChildID":103 }     }
]}

Now I can bind the MasterTable like

radGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = "CustomerID";
boundColumn.HeaderText = "CustomerID";

radGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = "Name";
boundColumn.HeaderText = "Name";

radGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = "Phone";
boundColumn.HeaderText = "Phone";

radGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = "Child";
boundColumn.HeaderText = "Child";

But here is the problem, this shows

[object Object]

in the Child column.

But I want to bind the column to Child.Name

I tried

radGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = "Child.Name";
boundColumn.HeaderText = "Child.Name";

That doesnt work.

How to do that ?

Cheers

Bernd
Veli
Telerik team
 answered on 16 Sep 2010
1 answer
118 views
I have a page with a FormView which several RadComboBoxes. Everything works OK. If I insert a usercontrol in the formview, RadComboBox images are not show.

Using Firebug I noticed that some images point to: mvwres://Telerik.Web.UI, Version=2010.1.415.40...
For example:
RadComboBox_Default .rcbArrowCellRight
url("mvwres://Telerik.Web.UI, Version=2010.1.415.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.ComboBox.rcbSprite.png")

I have remove the usercontrol and try again, everything comes back to normality (the mvwres:// urls are removed).

Any ideas?
Thanks!
Jorge
Top achievements
Rank 1
 answered on 16 Sep 2010
1 answer
177 views
I'm using a RadGrid with GridEditCommandColumn, my datasource is a list of objects that can't be updated directly and I want to handle inserts\updates\deletes manually...my problem is when I click the GridEditCommandColumn.Update icon I get a postback but not other event fires.  How can I get updateCommand event to fire.  Also...

RadGrid1.MasterTableView.EditMode =

 

GridEditMode.InPlace;

 

RadGrid1.MasterTableView.AllowAutomaticDeletes =

 

false;

 

RadGrid1.MasterTableView.AllowAutomaticInserts =

 

false;

 

RadGrid1.MasterTableView.AllowAutomaticUpdates =

 

false;

Thanks

 

Tsvetina
Telerik team
 answered on 16 Sep 2010
1 answer
145 views
Hi,
I need scroll content from a repeater, like this example: http://demos.telerik.com/aspnet-ajax/slider/examples/customscrollbar/defaultcs.aspx, but instead of static text in a div, bind from a datasource.
Below my code block.

Anyone have any ideas?

Thanks a lot.

<div id="boxNews">
    <asp:ObjectDataSource runat="server" ID="odsNews" TypeName="Entities.News" SelectMethod="ListNews">
        <SelectParameters>
            <asp:Parameter Type="String" Name="pTitle" DefaultValue="" ConvertEmptyStringToNull="true" />
            <asp:Parameter Type="DateTime" Name="pDate" DefaultValue="" ConvertEmptyStringToNull="true" />
            <asp:Parameter Type="Int32" Name="pUnitID" DefaultValue="0" />
            <asp:Parameter Type="Int32" Name="pLimit" DefaultValue="1" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <div id="textoNews" class="scroll">
        <asp:Repeater runat="server" ID="rptNews" DataSourceID="odsNews">
            <ItemTemplate>
                            <a href='Noticias/Noticias.aspx?idNoticia=<%#Eval("ID") %>'>
                                <%#string.Format("{0:dd}", Eval("Date"))%>.<%#string.Format("{0:MMM}", Eval("Date")).Substring(0, 3)%>.<%#string.Format("{0:yyyy}", Eval("Date"))%><br /><%#Eval("Title")%><br /><p id="itemNews">
                                    <span style="font-weight: normal">
                                        <%# Eval("Description").ToString().Length > 50 ? Eval("Description").ToString().Substring(0, 50) + "..." : Eval("Description").ToString()%></span></p>
                                        <br />
                        </a>
            </ItemTemplate>
        </asp:Repeater>
    </div>
</div>
<telerik:RadSlider ID="RadSlider1" runat="server" Height="222px" Length="22"
    Orientation="Vertical" Width="200px">
</telerik:RadSlider>
Svetlina Anati
Telerik team
 answered on 16 Sep 2010
1 answer
91 views
Is it possible to right-align text in a text box using RadInputManager with a NumericTextBoxSetting?
Dimo
Telerik team
 answered on 16 Sep 2010
1 answer
94 views
Hi,
Standard users are experiencing malfunctioning of the RadEditor web part on our MOSS 2007 system ever since their laptops have been upgraded to the Windows 7 operating system.

The issues I am facing are:
1. font type cannot be changed to 'arial'.  The code doesn't get added.  I've been working around this by changing the font type to another type, which means the code gets written in (e.g. <font face = 'verdana') and then changing it in the html code view.
2. adding new table or image - in both cases the item always gets added to the top of the web part instead of where the coursor is located.  
3. font size cannot be changed to size '3' but other sizes are fine.  Same issue as with the font face.

Has anybody experienced similar issues?  Could it have anything to do with the desktop or IE settings?  I have IE v.8.0.7600.16385. 

Many thanks for any feedback.
jana
Stanimir
Telerik team
 answered on 16 Sep 2010
3 answers
104 views
Hi,
           i downloaded and installed fullfeatured radeditormoss.wsp 4.5.6.0. i am trying to use the radeditor in a custom aspx page, in the following way

<%@ Register TagPrefix="radE" Namespace="Telerik.SharePoint.FieldEditor" Assembly="RadEditorSharePoint, Version=4.5.6.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" %>
<%@ Register tagprefix="SharePoint1" namespace="Telerik.SharePoint" assembly="RadEditorSharePoint, Version=4.5.6.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" %>

  <SharePoint1:MOSSRadEditor  id="rftDefaultValue" runat="server"   width="500px" Height="400px"  EnableContextMenus="False"></SharePoint1:MOSSRadEditor>


but the sharepoint designer shows the following error
Error Creating Control - rftDefaultValueCannot instantiate type 'MOSSRadEditor' because there is no public parameterless constructor.
How do i get this MOSSRadEditor control working on custom aspx page.
please help.
thank you all

Stanimir
Telerik team
 answered on 16 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?