Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
134 views
We're using the RadTreeView to show a hierarchical structure.

Since our data does not follow the format required, (parentid, id, text), we are creating a datatable on the fly, adding values (and additional attributes) and binding. Now the user can add more information to the tree.

When the user is done, we want to access all the data from the tree, convert it to our format and save it back to the database.

The question is: can I access the datatable as it is? For every edit, I'm adding the required data to the datatable (using node attributes).

If not, what is the best way to get all the data out and write it in my required format?

Thanks in Advance.
Boyan Dimitrov
Telerik team
 answered on 11 Sep 2014
1 answer
115 views
In the AddAjaxSetting(Control ajaxifiedControl, Control updatedControl) method, is it ok for both Control arguments to be the same object? For example:

radAjaxMgr1.AjaxSettings.AddAjaxSetting(myCustomEditor, myCustomEditor);

 myCustomEditor is of the type WebControl. It looks like myCustomEditor is going to respond to some client-side action on itself, but is that allowed by the RadAjaxManager?

Thanks!
Konstantin Dikov
Telerik team
 answered on 11 Sep 2014
10 answers
528 views
Hi,

I'm using a radgrid with a templated edit form and popup edit mode. Most of my validators are requireduiredfieldvalidators but one of my fields need to be validated agains the database. I therefore need to use a CustomValidator which is OK but if I do the validation server side then the error is not shown at the same time as the client side validator errors in the validationsummary.

Therefore I'm trying to call an AJAX method in the custom validator:

ClientValidationFunction="InitiateAsyncRequest('this.id')";

This calls the a server side method:

  public void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

In this method I would like to perform the validation and then set the IsValid flag on the customervalidator. The problem I am having is finding the CustomValidator control in the AjaxRequest method on the server. The SelectedItems property on the RadGrid is empy and RadGrid.FindControl("Customvalidator1") returns null. Is this possible? Or is there an easier way to do this?

Thanks, Stuart


Maria Ilieva
Telerik team
 answered on 11 Sep 2014
1 answer
99 views
I have a RadGrid which uses InPlace editing, and this grid contains a RadComboBox and a RadTextBox. When the user changes the text choice of the RadTextBox, the value behind the choice is used to retrieve data using AutoPostBack, and the returned data needs to update the text value of the RadTextBox.

Here's what the .aspx code looks like:

<telerik:RadGrid ID="rgvMsgElementToMsgTemplate" runat="server" GridLines="None" AutoGenerateColumns="false" MasterTableView-NoMasterRecordsText="No Records To Display">
    <MasterTableView CommandItemDisplay="Top" NoDetailRecordsText="No Records To Display" EditMode="InPlace">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                <HeaderStyle Width="50px" />
            </telerik:GridEditCommandColumn>
            <telerik:GridTemplateColumn DataField="TMPLT_NM" HeaderText="Template" UniqueName="TMPLT_NM">
                 <HeaderStyle Width="200px" />
                 <ItemTemplate>
                     <asp:LinkButton ID="lblMessageTemplate" CommandName="EDIT" runat="server" Text='<%#Container.DataItem("TMPLT_NM")%>' />                                                                                   
                 </ItemTemplate>
                 <InsertItemTemplate>
                    <telerik:RadComboBox runat="server" ID="rcbTemplate" DataTextField="TMPLT_NM" DataValueField="AMCAT_ID" Width="190px" DropDownAutoWidth="Enabled"
                        OnSelectedIndexChanged="rcbTemplate_SelectedIndexChanged" AutoPostBack="true"></telerik:RadComboBox>
                    <asp:RequiredFieldValidator ID="rcbTemplateValidator" CssClass="redreq" ControlToValidate="rcbTemplate" InitialValue="-- Select an Item --" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                 </InsertItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Version Id" UniqueName="TMPLT_VRS_ID" DataField="TMPLT_VRS_ID">
                <HeaderStyle Width="50px" />
                <ItemTemplate>
                    <%# Eval("TMPLT_VRS_ID")%>
                </ItemTemplate>
                <InsertItemTemplate>
                    <telerik:RadTextBox runat="server" ID="rtbVersion" DataField="TMPLT_VRS_ID" readonly="true" Width="50px"></telerik:RadTextBox>
                </InsertItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

My issue is that inside the SelectedIndexChanged event, I don't know how to access the InsertItem(s) defined in the .aspx from within this event. I have tried to use the NamingContainer, EditItems collection, the GetInsertItems() function, using a Try/DirectCast to FindControl to no avail.


Public Sub rcbTemplate_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
 
' Somewhere in here I need to get to the each item inside the InPlace edit section of the grid...
 
End Sub

Is this even possible?

Thanks.

Jim











Eyup
Telerik team
 answered on 11 Sep 2014
1 answer
82 views
Hi there,

Is there a way to paste images directly into the Rich text field without having the need to use first the Image manager? My users make this as a key requirement.

Thanks
Ianko
Telerik team
 answered on 11 Sep 2014
1 answer
175 views
2014.2.724.45
When in Grid Init event:
GridID.FilterMenu.Items.Clear()

With filtering active on a column, clicking the filter button generates this javascript error:

Uncaught TypeError: Cannot read property `_linkElement` of undefined

Referring to this code:
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.GridColumn=function(a){Telerik.Web.UI.GridColumn.initializeBase(this,[a]);
.....
var h=this._filterMenu.get_focusedItem()||this._filterMenu.get_items().getItem(0);
if(h._linkElement){h._linkElement.focus();  <-- err line. 6623
}else{if(h._templateElement){h._templateElement.focus();

The line above does not appear in the the version 2014.1.403.45 nor does the same error happen.

I have to add 
<ClientEvents OnFilterMenuShowing="RadGrid_DisableFilterMenu" />

function RadGrid_DisableFilterMenu(sender, args) {
  args.set_cancel(true)
}
Konstantin Dikov
Telerik team
 answered on 11 Sep 2014
1 answer
89 views
I truly believe that if Telerik would provide a full graphical class diagram of the entire RadGrid class, that many of the questions seen in this forum would just disappear. The currently available HTML based API document is a poor representation of the RadGrid class and it is useless for determining how to access subclass elements of the RadGrid.

Is there anyway for Telerik to provide such a diagram?
Kostadin
Telerik team
 answered on 11 Sep 2014
2 answers
171 views
Dear Telerik Team,

Though I have asp:RequiredFieldValidator to validate fields in inline edit form, when I click submit button validators doesn't stop postback when field value is empty.

I look forward to have your assistance. I can provide other page if required.

Regards

Pathan L.

<code>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadCodeBlock runat="server" ID="radCodeBlock">

    <script type="text/javascript">

        function onAddressRadToolBarButtonClicking(sender, args) {
            var masterTableViewAddress = getMaterTableViewAddress();
            if (masterTableViewAddress != null) {
                var comandNameAddress = args.get_item().get_commandName();
                if (comandNameAddress == 'Delete') {
                    if (masterTableViewAddress.get_selectedItems().length > 0) {
                        args.set_cancel(!confirm('Are you sure you want to delete selected address/s?'));
                    }
                    else {
                        alert('You must select a grid row first before processing delete.');
                        args.set_cancel(true);
                    }
                }
                else if (comandNameAddress == 'ToggleFilterBar') {
                if (masterTableViewAddress.get_isFilterItemVisible()) {
                        hideFilterItemAddress(masterTableViewAddress);
                    }
                    else {
                        showFilterItemAddress(masterTableViewAddress);
                    }
                    args.set_cancel(true);
                }
            }
        }


        function getMaterTableViewAddress() {
            var gridAddress = $find("<%=rdgAddressGrid.ClientID %>");
            return gridAddress.get_masterTableView();
        }


        function showFilterItemAddress(masterTableViewAddress) {
            masterTableViewAddress.showFilterItem();
        }
        
        function hideFilterItemAddress(masterTableViewAddress) {
            masterTableViewAddress.hideFilterItem();
        } 
    </script>


</telerik:RadCodeBlock>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelAddress" runat="server" Skin="Vista">
</telerik:RadAjaxLoadingPanel>
<telerik:RadGrid ID="rdgAddressGrid" runat="server" Skin="Vista" AllowPaging="True"
    AllowSorting="True" AllowMultiRowSelection="true" AutoGenerateColumns="False"
    OnNeedDataSource="rdgAddressGrid_NeedDataSource" Width="99%" ShowStatusBar="True"
    GridLines="None" PageSize="5" AllowFilteringByColumn="true" OnItemCommand="rdgAddressGrid_ItemCommand"
    EnableViewState="true" OnItemDataBound="rdgAddressGrid_ItemDataBound" 
    OnPreRender="rdgAddressGrid_PreRender" onload="rdgAddressGrid_Load">
    <ValidationSettings EnableValidation="true" ValidationGroup="AddressGrid" CommandsToValidate="PerformInsert, Update" />
    <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" PrevPageToolTip="Previous"
        NextPagesToolTip="Next" />
    <MasterTableView EditMode="EditForms" Name="mtvPhone" CommandItemDisplay="Top" DataKeyNames="intAddressID, intStudentID">
    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
        <Columns>
            <telerik:GridClientSelectColumn UniqueName="CheckboxSelectColumn" ItemStyle-HorizontalAlign="Left">
                <HeaderStyle Width="25px" />
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridClientSelectColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                <HeaderStyle Width="30px" />
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridEditCommandColumn>
            <telerik:GridCheckBoxColumn DataField="ysnPrimaryAddress" ConvertEmptyStringToNull="true"
                DefaultInsertValue="false" HeaderText="Primary" SortExpression="ysnPrimaryAddress"
                UniqueName="ysnPrimaryAddress" HeaderTooltip="Primary" AllowFiltering="false">
                <HeaderStyle Width="50px" />
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridCheckBoxColumn>
            <telerik:GridBoundColumn DataField="strAddressType" HeaderText="Address Type" SortExpression="strAddressType"
                UniqueName="strAddressType" HeaderTooltip="Address Type" CurrentFilterFunction="Contains">
                <HeaderStyle Width="90px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="strAddress1" HeaderText="Address 1" SortExpression="strAddress1"
                UniqueName="strAddress1" HeaderTooltip="Address 1" CurrentFilterFunction="Contains">
                <HeaderStyle Width="125px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="strAddress2" HeaderText="Address 2" SortExpression="strAddress2"
                UniqueName="strAddress2" HeaderTooltip="Address 2" CurrentFilterFunction="Contains">
                <HeaderStyle Width="125px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="strStreet" HeaderText="Street" SortExpression="strStreet"
                UniqueName="strStreet" HeaderTooltip="Street" CurrentFilterFunction="Contains">
                <HeaderStyle Width="125px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="strCity" HeaderText="City" SortExpression="strCity"
                UniqueName="strCity" HeaderTooltip="City" CurrentFilterFunction="Contains">
                <HeaderStyle Width="90px" />
            </telerik:GridBoundColumn>
        </Columns>


<PagerStyle AlwaysVisible="True"></PagerStyle>
        <CommandItemTemplate>
            <telerik:RadToolBar Skin="Vista" ID="rtbAddressCommand" OnClientButtonClicking="onAddressRadToolBarButtonClicking"
                runat="server" AutoPostBack="true">
                <Items>
                    <telerik:RadToolBarButton Text="Add new address" ID="btnInitInsertAddress" runat="server"
                        CommandName="InitInsert" ImageUrl="~/images/telerik/AddRecord.gif" ImagePosition="Left">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Delete address" ID="btnDeleteAddress" runat="server"
                        CommandName="Delete" ImageUrl="~/images/telerik/Delete.gif" ImagePosition="Left">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Toggle filtering" ID="ToggleFilteringAddress" runat="server"
                        CommandName="ToggleFilterBar" ImageUrl="~/images/telerik/search.png" ImagePosition="Left">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Refresh" ID="btnRefreshAddress" runat="server" CommandName="RebindGrid"
                        ImageUrl="~/images/telerik/Refresh.gif" ImagePosition="Left" CausesValidation="false">
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </CommandItemTemplate>
        <EditFormSettings ColumnNumber="3" EditFormType="Template" CaptionFormatString="Edit details for Address with ID {0}"
            CaptionDataField="intAddressID">
            <EditColumn ButtonType="ImageButton" InsertText="Insert" UpdateText="Update" UniqueName="EditCommandColumn1"
                CancelText="Cancel">
            </EditColumn>
            <FormTemplate>
                <table width="100%">
                    <tr>
                        <td style="vertical-align: top;">
                            <table border="0" width="80%">
                                <colgroup>
                                    <col width="50%" />
                                    <col width="50%" />
                                </colgroup>
                                <tbody>
                                    <tr>
                                        <td colspan="2" style="font-weight: bold">
                                            <%-- Edit details for Address with ID--%>
                                            <asp:Label ID="lblEditDetails" Text='<%# (Container is GridEditFormInsertItem) ? "" : "Edit details for Address with ID: "+ Eval( "intAddressID") %>'
                                                runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="vertical-align: top;">
                                            <table border="0" cellspacing="5" cellpadding="5">
                                                <tbody>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                Is Primary:</label>
                                                        </td>
                                                        <td align="left">
                                                            <asp:CheckBox ID="chkPrimary" Checked='<%#Bind("ysnPrimaryAddress")%>' runat="server" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                Address Type:</label>
                                                        </td>
                                                        <td>
                                                            <telerik:RadComboBox CssClass="TelerikTextBox2" Width="200px" AccessKey="T" ID="ddlAddressType"
                                                                runat="server" AppendDataBoundItems="True" Filter="Contains" 
                                                                CausesValidation="False" ValidationGroup="AddressGrid">
                                                            </telerik:RadComboBox>
                                                            <br />
                                                            <asp:RequiredFieldValidator ID="rfvAddressType" runat="server" ControlToValidate="ddlAddressType"
                                                                ErrorMessage="Address Type is missing." Display="Dynamic" ValidationGroup="AddressGrid" CssClass="validator">
                                                            </asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                Address 1:
                                                            </label>
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadTextBox CssClass="TelerikTextBox2" ID="txtAddress1" Text='<%# Bind( "strAddress1") %>'
                                                                runat="server" Width="200px" MaxLength="50" ValidationGroup="AddressGrid">
                                                            </telerik:RadTextBox><br />
                                                            <asp:RequiredFieldValidator ID="rfvAddress1" runat="server" ControlToValidate="txtAddress1"
                                                                ErrorMessage="Address 1 is missing." Display="Dynamic" CssClass="validator" ValidationGroup="AddressGrid"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                Address 2:</label>
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadTextBox ID="txtAddress2" CssClass="TelerikTextBox2" Text='<%# Bind( "strAddress2") %>'
                                                                runat="server" Width="200px" MaxLength="50">
                                                            </telerik:RadTextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                Street:</label>
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadTextBox ID="txtStreet" CssClass="TelerikTextBox2" Text='<%# Bind( "strStreet") %>'
                                                                runat="server" Width="200px" MaxLength="50">
                                                            </telerik:RadTextBox>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                        <td style="vertical-align: top;">
                                            <table border="0" cellspacing="5" cellpadding="5">
                                                <tbody>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                City:</label>
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadTextBox CssClass="TelerikTextBox2" ID="txtCity" Text='<%# Bind( "strCity") %>'
                                                                runat="server" MaxLength="50" ValidationGroup="AddressGrid">
                                                            </telerik:RadTextBox><br />
                                                            <asp:RequiredFieldValidator ID="rfvCity" runat="server" ControlToValidate="txtCity"
                                                                ErrorMessage="City is missing." Display="Dynamic" CssClass="validator" ValidationGroup="AddressGrid"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                Zip:</label>
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadTextBox CssClass="TelerikTextBox2" ID="txtZip" Text='<%# Bind("strZip") %>'
                                                                runat="server" MaxLength="50">
                                                            </telerik:RadTextBox><br />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                State:</label>
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadComboBox CssClass="TelerikTextBox2" Width="130px" Skin="Vista" ID="ddlState"
                                                                runat="server" MarkFirstMatch="true" Filter="Contains" AllowCustomText="false">
                                                                <Items>
                                                                    <telerik:RadComboBoxItem Value="Gujarat" Text="Gujarat" />
                                                                </Items>
                                                            </telerik:RadComboBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left">
                                                            <label>
                                                                Country:</label>
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadComboBox CssClass="TelerikTextBox2" Width="130px" Skin="Vista" ID="ddlCountry"
                                                                runat="server" MarkFirstMatch="true" Filter="Contains" AllowCustomText="false">
                                                                <Items>
                                                                    <telerik:RadComboBoxItem Value="India" Text="India" />
                                                                </Items>
                                                            </telerik:RadComboBox>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="left">
                                            <asp:ImageButton ImageUrl="~/images/telerik/tick.gif" ID="btnUpdate" ValidationGroup="AddressGrid"
                                                CausesValidation="true" runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'>
                                            </asp:ImageButton>&nbsp;
                                            <asp:ImageButton ID="btnCancel" ImageUrl="~/images/telerik/cancel.gif" runat="server"
                                                CausesValidation="False" CommandName="Cancel"></asp:ImageButton>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
            </FormTemplate>
        </EditFormSettings>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>


        <RowIndicatorColumn Visible="false">
        </RowIndicatorColumn>
    </MasterTableView>
    <ClientSettings AllowColumnsReorder="True" AllowKeyboardNavigation="true" AllowAutoScrollOnDragDrop="true"
        ReorderColumnsOnClient="true" AllowDragToGroup="True" EnableRowHoverStyle="true">
        <Selecting AllowRowSelect="True" />
        <Selecting AllowRowSelect="True" />
        <ClientMessages DragToGroupOrReorder="Select All" />
        <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true">
        </Scrolling>
        <Resizing AllowColumnResize="true" EnableRealTimeResize="true" AllowRowResize="true" />
    </ClientSettings>
    <FilterMenu EnableEmbeddedSkins="true">
    </FilterMenu>
</telerik:RadGrid>
<asp:SqlDataSource ID="dsAddressType" runat="server" ConnectionString="<%$ ConnectionStrings:NirmalNiketalCNetWeb_ConnectionString %>"
    SelectCommand="usp_GetReferenceChildByParentName" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:Parameter Name="strParentName" Type="String" DefaultValue="AddressType" />
    </SelectParameters>
</asp:SqlDataSource>

<code/>

Vijay
Top achievements
Rank 1
 answered on 11 Sep 2014
15 answers
733 views
Hello All,
               I am trying to export selected values from my grid to a CSV.  All I can manage is to export the entire grid values.
These two links show how to do it. 
http://www.telerik.com/community/forums/aspnet-ajax/grid/exporting-only-selected-rows.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/exporting-selected-radgrid-rows-to-excel-csv.aspx

But, unfortunately I am not able to achieve that. I want to export only the rows selected and if none of the rows are selected, I want to export the entire grid. Here is my code
protected void ButtonGo_Click(object sender, EventArgs e)
        {
            if (DropDownList2.SelectedValue == "ExportToCSV")
            {
                foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
                {
                    if (!item.Selected)
                    {
                        item.Visible = false;
                    }
                }
                RadGrid1.ExportSettings.IgnorePaging = true;
                RadGrid1.ExportSettings.FileName = "CanvasData";
                RadGrid1.MasterTableView.ExportToCSV();
            }
        }


Any help is really appreciated.


Kostadin
Telerik team
 answered on 11 Sep 2014
5 answers
159 views
Hello,

I am using RadChart, and when i apply skin ( LightBlue ), i am try change legend color, and no change.
If i no use skin, its work. Else no work.

Anybody can help?

Partof HTML
                            <td colspan="2" align="center">
                                <telerik:RadChart ID="chtDesempenhoProcesso1" runat="server" Width="970px" Height="420px"  OnDataBound="chtDesempenhoProcesso1_DataBound" Skin="LightBlue" AutoTextWrap="true">
                                    <PlotArea>
                                        <EmptySeriesMessage Visible="True">
                                            <Appearance Visible="True">
                                            </Appearance>
                                        </EmptySeriesMessage>
                                        <Appearance>
                                            <Border Width="0" Visible="true" />
                                        </Appearance>
                                        <XAxis DataLabelsColumn="Area">
                                        </XAxis>
                                        <YAxis MinValue="0" MaxValue="100" AutoScale="false" Step="10" Appearance-MinorGridLines-Visible="false" Appearance-MajorGridLines-Visible="false">
                                        </YAxis>
                                    </PlotArea>
                                    <ChartTitle>
                                        <TextBlock Text="Dimensão">
                                        </TextBlock>
                                    </ChartTitle>

                                </telerik:RadChart>
                            </td>

aspx.cs

    protected void chtDesempenhoProcesso1_DataBound(object sender, EventArgs e)
    {
        chtDesempenhoProcesso1.PlotArea.XAxis[0].TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font(new System.Drawing.Font("Arial", 10), System.Drawing.FontStyle.Bold);

        if (chtDesempenhoProcesso1.Chart.PlotArea.XAxis.Items.Count > 0)
        {
            for (int i = 0; i < chtDesempenhoProcesso1.Chart.PlotArea.XAxis.Items.Count; i++)
            {
                ChartSeriesItem item = chtDesempenhoProcesso1.Series[5].Items[i];
                item.Appearance.FillStyle.MainColor = System.Drawing.Color.DarkGray;
                item.Appearance.FillStyle.SecondColor = System.Drawing.Color.Gray;
                item.Appearance.Shadow.Distance = 155;
                item.Appearance.Border.Color = System.Drawing.Color.Gray;

              }
                // This code no change legend color
            chtDesempenhoProcesso1.Series[5].Appearance.FillStyle.MainColor = System.Drawing.Color.DarkGray;
        }

    }

thx..
Danail Vasilev
Telerik team
 answered on 11 Sep 2014
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?