Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
203 views
function checkEnter6() {
if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Chrome') !== -1) {

if (event.keyCode === 13) {
var grid = $find("<%= rgClaimLines.ClientID %>");
if (grid) {
var EditItems = grid.get_editItems();
for (var i = 0; i < EditItems.length; i++) {
var editItem = EditItems[0];
var textBox = $(editItem.get_editFormItem()).find("input[id*='ddl_Paid']").get(0);
textBox.focus();
event.preventDefault();
return false;
}
}

}

} else {

if (event.keyCode === 13) {
event.keyCode = 9;

}
}

}

In this function I am able to override the enter key in chrome to set focus to the next input field. My problem is moving focus from the last input field to the Update button of the GridEditCommandColumn.

Any ideas out there?

Cheers
Marius 
Viktor Tachev
Telerik team
 answered on 19 Jun 2014
8 answers
289 views
Hi I'm using Telerik ASP .Net Ajax 2013.1 417 (latest stable version)

I wand to trigger hide/show column with HeaderContextMenu and ColumnGroups

Under some circonstances layout is messed up, changes are not applied correctly to the columns groups.

Here is my sample:
- When deselecting Appt column (column 3): the third column group (Action) is wrongly hidden (display:none is added)
- When deselecting Nom 2 column (column 7) : the seond column group is not changed, resulting in a messed up display (its colspan shoud be lowered and it's not)

Can you help me?
<telerik:RadGrid   ID="RadGrid1"  OnItemCreated="RadGrid1_ItemCreated"  PageSize="2" AllowPaging="true" runat="server"  Skin="Default" Culture="fr-FR"   OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged"  DataSourceID="DataSource1" >
    <MasterTableView  runat="server"  AutoGenerateColumns="False"   CommandItemDisplay="None" EnableHeaderContextMenu="true">
     
     <CommandItemSettings  ShowExportToCsvButton="true" />
            <ColumnGroups>
            <telerik:GridColumnGroup  Name="Mandat" HeaderText="Mandat"  HeaderStyle-CssClass="GroupingHeaderTitle" />
          
                    <telerik:GridColumnGroup Name="Candidat" HeaderText="Candidat"   HeaderStyle-CssClass="GroupingHeaderTitle"/>
                    <telerik:GridColumnGroup Name="Action" HeaderText="Action" HeaderStyle-CssClass="GroupingHeaderTitle" />
                     
            </ColumnGroups>
            <Columns>
               <telerik:GridTemplateColumn Groupable="false" HeaderText="N°" ColumnGroupName="Mandat">
                 
                    <ItemTemplate><asp:Label ID="LblNumeroMandant" Text='<%# Eval("TmpUnite_NoMdt") %>' runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="Nom" ColumnGroupName="Mandat">
                    <ItemTemplate><asp:Label ID="LblNomMandant" Text='<%#Eval("TmpUnite_LbMnd") %>' runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="Appt" ColumnGroupName="Mandat">
                    <ItemTemplate><asp:Label ID="LblAppt" Text='<%# Eval("TmpUnite_NoApp") %>' runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="Nature" ColumnGroupName="Mandat">
                    <ItemTemplate><asp:Label ID="LblNature" Text='<%#Eval("TmpUnite_LbApp") %>' runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="Vacant" ColumnGroupName="Mandat">
                    <ItemTemplate><asp:Label ID="LblVacant" Text='<%#Eval("TmpUnite_DtVac") %>' runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="N°" ColumnGroupName="Candidat">
                    <ItemTemplate><asp:Label ID="Lbl" Text='<%# Eval("TmpCandloc_NoMdt") %>' runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="Nom 2" ColumnGroupName="Candidat">
                    <ItemTemplate><asp:Label ID="LblNomCandidat" Text='<%# Eval("TmpCandloc_LbClo") %>' runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="Annulation" ColumnGroupName="Candidat">
                    <ItemTemplate><asp:Label ID="LblAnnulation" Text="" runat="server" /></ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn Groupable="false" HeaderText="Action" HeaderStyle-HorizontalAlign="Center"  ColumnGroupName="Action">
                    <ItemTemplate>
                        <center>
                        <asp:ImageButton ID="IBConsultation" SkinID="Consultation" runat="server" />  
                        <asp:ImageButton ID="IBModification" SkinID="Modification" runat="server" />  
                        <asp:ImageButton ID="IBSuppression" SkinID="Suppression" runat="server" />  
                        <asp:ImageButton ID="IBValidation" SkinID="Validation" runat="server" />
                        </center>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                 
            </Columns>
             
            <PagerStyle AlwaysVisible="true" Mode="NextPrevNumericAndAdvanced"  PageSizes="10,30,60" />
        </MasterTableView>
        <ClientSettings AllowColumnsReorder="True"  EnablePostBackOnRowClick="true"  EnableRowHoverStyle="true">
            <Resizing AllowColumnResize="true"  ClipCellContentOnResize="false" EnableRealTimeResize="true"  />
            <Selecting AllowRowSelect="true"/>
        </ClientSettings>
    </telerik:RadGrid>
(maybe as a correction in the future Q2 2013)
Maria Ilieva
Telerik team
 answered on 19 Jun 2014
3 answers
225 views
Hi All,

I need to set font size in GroupHeaderItemStyle. but it does not work when i set value for GroupHeaderItemStyle-Font-Size in MasterTableView or Font-Size in GroupHeaderItemStyle tab. May i know the reason why its not working?
Princy
Top achievements
Rank 2
 answered on 19 Jun 2014
1 answer
222 views
I am using RadTabStrip as a wizard.
On one of the page views I have usercontrol that loads a grid. I calculate the footer total on one of the columns in ItemDatabound event.
If I move to a previous tab and then come back to the tab with the grid, I notice that my Itemdatabound event is called twice and henece my total gets doubled up.

I can't figure out why the ItemdataBound event is fired twice.

<%@ Page Language="C#" MasterPageFile="~/enrollment/enrollmentWizard.master" AutoEventWireup="true"
    CodeFile="EDCP.aspx.cs" Inherits="enrollment_theCompany_EDCP" Title="M Benefit Solutions: The Comapny Enrollment" %>
 
<%@ MasterType VirtualPath="~/enrollment/enrollmentWizard.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register TagPrefix="iSys" TagName="summary" Src="~/enrollment/ucEnrollmentSummary.ascx" %>
<%@ Register TagPrefix="iSys" TagName="fundBucket" Src="~/fund/ucFundbucket.ascx" %>
<%@ Register TagPrefix="iSys" TagName="deferralElections" Src="~/enrollment/thecompany/deferralElections.ascx" %>
<%@ Register TagPrefix="iSys" TagName="paymentOptions" Src="~/enrollment/thecompany/paymentOptions.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rmpEnrollment">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtsEnrollment" />
                    <telerik:AjaxUpdatedControl ControlID="rmpEnrollment" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rtsEnrollment">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtsEnrollment" />
                    <telerik:AjaxUpdatedControl ControlID="rmpEnrollment" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <table cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td>
                <telerik:RadTabStrip ID="rtsEnrollment" runat="server" MultiPageID="rmpEnrollment"
                    OnTabClick="rtsEnrollment_TabClick" SelectedIndex="0" CausesValidation="true"
                    Align="Justify" AutoPostBack="true">
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="rmpEnrollment" runat="server" SelectedIndex="0" OnPageViewCreated="rmpEnrollment_PageViewCreated"
                    OnPreRender="rmpEnrollment_PreRender" RenderSelectedPageOnly="true" CssClass="multiPage">
                </telerik:RadMultiPage>
            </td>
        </tr>
    </table>
</asp:Content>
 
aspx.cs
 
public partial class enrollment_theCompany_EDCP : EnrollmentBasePage
{
    protected override void LoadStep()
    {
        string tabName = rtsEnrollment.SelectedTab.Text;
        RadTab tab = rtsEnrollment.FindTabByText(tabName);
 
        switch (rtsEnrollment.SelectedTab.Text)
        {
            case "Deferral Elections":
                break;
 
            case "Distribution Elections":
                break;
 
            case "Fund Allocations":
                RadPageView pvFundAllocations = (RadPageView)tab.PageView.FindControl("fundAllocations");
                ucFundBucket ucFundAllocations = (ucFundBucket)pvFundAllocations.FindControl("ucFundAllocations");
                ucFundAllocations.LoadPlan();
                break;
 
            case "Enrollment Summary":
                // commit data
                break;
        }
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            AddTab("Deferral Elections", true);
 
            RadPageView pageView = new RadPageView();
            pageView.ID = "DeferralElections";
            rmpEnrollment.PageViews.Add(pageView);
 
            AddTab("Distribution Elections", false);
            AddTab("Fund Allocations", false);
            AddTab("Enrollment Summary", false);
 
            LoadStep();
        }      
    }
 
    #region UI Events
 
    protected void rmpEnrollment_PreRender(object sender, EventArgs e)
    {
        LoadStep();
    }
 
    protected void rmpEnrollment_PageViewCreated(object sender, RadMultiPageEventArgs e)
    {
        Control pageViewContents = new Control();
        //code
    }
    protected void rtsEnrollment_TabClick(object sender, RadTabStripEventArgs e)
    {
        Page.Validate(rtsEnrollment.ValidationGroup);
        if (Page.IsValid)
            rtsEnrollment.ValidationGroup = e.Tab.Value;
 
        LoadStep();       
    }
    protected void PreviousButton_Click(object sender, EventArgs e)
    {
    }
    protected void ContinueButton_Click(object sender, EventArgs e)
    {
    }
    protected void FinishButton_Click(object sender, EventArgs e)
    {
    }   
    #endregion
}
 
.ascx for Fund Allocations
 
<%@ Control Language="c#" Inherits="iSys.fund.ucFundBucket" CodeFile="ucFundbucket.ascx.cs" %>
<%@ Register TagPrefix="iSys" TagName="pieChart" Src="~/Common/ucPieChart.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <telerik:RadAjaxManagerProxy ID="RadAJAXManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgFunds">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="_successfulPostMessage" />
                    <telerik:AjaxUpdatedControl ControlID="rgFunds" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="_fundsPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <asp:PlaceHolder ID="_allocationPanel" runat="server">
        
        <asp:PlaceHolder ID="_fundsPanel" runat="server" Visible="true">
            <tr valign="top">
                <td align="left" style="width: 50%" rowspan="2">
                    <telerik:RadGrid ID="rgFunds" runat="server" AllowSorting="False" EnableViewState="true" AllowPaging="false"
                         GridLines="Both" AllowMultiRowEdit="true" OnPreRender="rgFunds_PreRender" OnItemDataBound="rgFunds_ItemDataBound"
                        OnItemCreated="rgFunds_ItemCreated" OnItemCommand="rgFunds_ItemCommand" OnNeedDataSource="rgFunds_NeedDataSource">
                        <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="true" CommandItemDisplay="Bottom"
                            EditMode="InPlace" EnableNoRecordsTemplate="true">
                            <CommandItemTemplate>
                                <table width="100%">
                                    <tr>
                                        <td colspan="4" align="left">
                                            <asp:CheckBox ID="chkAutoRebalance" runat="server" Visible="false" CssClass="checkbox"
                                                OnCheckedChanged="chkAutoRebalance_CheckedChanged" />
                                        </td>
                                        <td align="right">
                                            <asp:Button ID="btnPostTransaction" runat="server" Text="Post Transaction" CssClass="button"
                                                CommandName="PostTransaction" />
                                        </td>
                                    </tr>
                                </table>
                            </CommandItemTemplate>
                            <Columns>
                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"
                                    FooterStyle-HorizontalAlign="Left" UniqueName="InvestmentOptions" ReadOnly="true"
                                    HeaderText="Investment Options">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="_pdfLink" runat="server" ImageUrl="~/App_Themes/Images/pdf_icon.gif"
                                            Visible="false" />
                                        <asp:Label ID="_color" runat="server">    </asp:Label>
                                        <asp:Label ID="_fundName" runat="server" Text='<%# Eval("fundName")%>'></asp:Label>
                                        <asp:CheckBox ID="_excludeFund" runat="server" Checked='<%# Eval("allowRebalanceExclude")%>'
                                            Text="Exclude?" Visible='<%# Eval("allowRebalanceExclude")%>' />
                                        <input type="hidden" id="_fundID" runat="server" />
                                        <input type="hidden" id="_autoRebalanceFlag" runat="server" />
                                        <input type="hidden" id="_allowRebalance" runat="server" />
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <strong>Total must equal 100%</strong></FooterTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Right" HeaderText="Current %"
                                    HeaderStyle-Width="20%" ReadOnly="true" DataField="currentPercent" UniqueName="currentPercent">
                                    <ItemTemplate>
                                        <asp:Label ID="_currentPercent" runat="server" Text='<%# Eval("currentPercent", "{0:N2}%")%>'>
                                        </asp:Label></ItemTemplate>
                                    <%--<FooterTemplate>
                                        <asp:Label ID="fundTotalOld" runat="server" />%
                                    </FooterTemplate>--%>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Right" UniqueName="futurePercent"
                                    HeaderStyle-Width="20%" HeaderText="New %">
                                    <ItemTemplate>
                                        <asp:Label ID="_futurePercent" runat="server" Text='<%# Eval("futurePercent", "{0:N2}%")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtNewPercent" runat="server" CssClass="percent" groupName="allocations"
                                            Width="40px" onchange="SumGroup(this, false)" Text='<%# Eval("futurePercent")%>' />
                                        %
                                        <asp:RangeValidator ID="newPercentageRange" runat="server" ControlToValidate="txtNewPercent"
                                            Type="Integer" CssClass="errormessagesmall" Display="None" />
                                        <asp:CustomValidator ID="newPercentageIncrement" runat="server" ControlToValidate="txtNewPercent"
                                            ClientValidationFunction="Mod_ClientValidate" CssClass="errormessagesmall" Display="None" />
                                        <cc1:ValidatorCalloutExtender ID="newPercentageRangeCallout" runat="server" TargetControlID="newPercentageRange"
                                            Width="235px" />
                                        <cc1:ValidatorCalloutExtender ID="newPercentageIncrementCallout" runat="server" TargetControlID="newPercentageIncrement"
                                            Width="235px" />
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="fundTotal" runat="server" CssClass="percent" onfocus="blur()" Enabled="false"
                                            Font-Bold="true" ForeColor="Black" Width="40px" />
                                        %
                                        <asp:CompareValidator ID="totalEqual100" runat="server" ControlToValidate="fundTotal"
                                            ValueToCompare="100" Operator="Equal" CssClass="errormessagesmall" Display="None"
                                            ErrorMessage="New allocations must total 100%." />
                                        <asp:RequiredFieldValidator ID="fundTotalRequired" runat="server" ControlToValidate="fundTotal"
                                            Display="None" Visible="false" ErrorMessage="You <em>must</em> enter an allocation." />
                                        <cc1:ValidatorCalloutExtender ID="fundTotalRequiredCallout" runat="server" TargetControlID="fundTotalRequired"
                                            Width="235px" />
                                        <cc1:ValidatorCalloutExtender ID="totalEqual100Callout" runat="server" TargetControlID="totalEqual100"
                                            Width="235px" />
                                    </FooterTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
        </asp:PlaceHolder>
</table>
 
.ascx.cs
 
    public partial class ucFundBucket : userControl
    {
         
        public void LoadPlan()
        {  
            rgFunds.Rebind();
        }       
 
        /// <summary>
        /// Loads the percents table and the charts
        /// </summary>
        private void DrawPie()
        {
            DateTime today = DateTime.Now;
            DataTable dt;
            DataView dv, dvFuture;
            if (_allocationType == FundAllocation.AllocationType.Rebalance)
            {
                //code
            }
            else
            {
                //code
            }        
 
            // bind to grid
            rgFunds.DataSource = dt;
        }
 
        protected void rgFunds_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == "PostTransaction")
            {
                //code
            }
        }
 
        protected void rgFunds_PreRender(object source, EventArgs e)
        {
            // only visible if is the actual employee
            btnPostTransaction.Visible = (ShowPostTransactionButton && IsCurrentEmployee);
 
            //Puts the grid in editmode
                foreach (GridItem item in rgFunds.MasterTableView.Items)
                {
                    if (item is GridEditableItem)
                    {
                        GridEditableItem editableItem = item as GridDataItem;
                        editableItem.Edit = true;
                    }
                }
                rgFunds.Rebind();           
 
            // Add the attribute to the fundTotal textbox
            GridItem gridFooterItem = rgFunds.MasterTableView.GetItems(GridItemType.Footer)[0];
            TextBox fundTotal = (TextBox)gridFooterItem.FindControl("fundTotal");
 
            GridItem[] gridEditItem = rgFunds.MasterTableView.GetItems(GridItemType.EditItem);
            if (gridEditItem.Count() > 0)
            {
                foreach (GridItem item in gridEditItem)
                {
                    TextBox txtNewPercent = item.FindControl("txtNewPercent") as TextBox;
                    txtNewPercent.Attributes.Add("totalName", fundTotal.ClientID);
                }
            }
        }
 
        protected void rgFunds_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            DrawPie();
        }
 
        protected void rgFunds_ItemCreated(object sender, GridItemEventArgs e)
        {
           //code
        }
 
        protected void rgFunds_ItemDataBound(object source, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem && e.Item.IsInEditMode)
            {
                GridDataItem item = (GridDataItem)e.Item;
                DataRowView view = (DataRowView)item.DataItem;
                
                //some code      
 
                TextBox txtNewPercent = (TextBox)item["futurePercent"].FindControl("txtNewPercent");
                string newPercent = txtNewPercent.Text.Replace("%", "");               
 
                _futureTotals += Double.Parse((newPercent == "") ? "0" : newPercent);
            }
            if (e.Item is GridFooterItem )
            {
                GridFooterItem footerItem = (GridFooterItem)e.Item;              
 
                TextBox fundTotal = (TextBox)footerItem["futurePercent"].FindControl("fundTotal");
                fundTotal.Text = (_futureTotals > 0) ? _futureTotals.ToString() : "";
 
                // require a future allocation if previous is zero
                RequiredFieldValidator fundTotalRequired = (RequiredFieldValidator)footerItem["futurePercent"].FindControl("fundTotalRequired");
                fundTotalRequired.Visible = ((_allocationType == FundAllocation.AllocationType.Future) && (_currentTotals == 0));              
            }
        }
    }
}


Nencho
Telerik team
 answered on 19 Jun 2014
1 answer
135 views
I have a dropdown in which when i select item from dropdown ,the cursor remains there on dropdown i dont want this to happen.


Please Suggest
Princy
Top achievements
Rank 2
 answered on 19 Jun 2014
4 answers
171 views
Where us the documentation and demos for using radpaging ???
Ivan Zhekov
Telerik team
 answered on 19 Jun 2014
5 answers
1.3K+ views
Hi,
I have a problem and would appreciate your help.

I would like to show on a HTML Pie Chart two values: the actual value (units) and a percentage (%).
So for example in such format: 35% (120units)  or  20% (110units) and so on. This should appear as a PieLabel and additionally as Tooltip (when someone moves cursor over pie).
For each data I have counted both values.

I prefer the programmatic creation of chart :) (in .aspx only the minimum)

So my code looks like:

chart.aspx:
<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="500" Height="500"
    Transitions="true">
    <Appearance>
        <FillStyle BackgroundColor="White" />
    </Appearance>
    <Legend>
        <Appearance BackgroundColor="White" Position="Right" Visible="true" />
    </Legend>
    <PlotArea>
        <Appearance>
            <FillStyle BackgroundColor="White" />
        </Appearance>
        <Series>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>


chart.aspx.cs:
private void ShowChart()
{
    PieSeries pieSeries = new PieSeries();
       
 
        listContactsAmount = report.GetCampaignData(iCampaignId); // get my data
 
        if (listContactsAmount != null && listContactsAmount.Count > 0)
        {
            int sum = 0;
            foreach (DataRow row in listContactsAmount.Rows)
            {
                sum = sum + (int)row["ContactsAmount"]; 
            }
 
            pieSeries.StartAngle = 90;
            pieSeries.LabelsAppearance.DataFormatString = "{0}";
            pieSeries.LabelsAppearance.Position = Telerik.Web.UI.HtmlChart.PieLabelsPosition.Circle;
            pieSeries.TooltipsAppearance.DataFormatString = "{0}";
            
            SeriesItem seriesItem = null;
 
            foreach (DataRow row in listContactsAmount.Rows)
            {
                seriesItem = new SeriesItem();
 
                string contactsStatus = (string)row["ContactsStatus"];
 
                int contactsAmount = (int)row["ContactsAmount"]; // the first value to display
                decimal percentage = Math.Round(Decimal.Divide((decimal)contactsAmount, (decimal)sum), 4); // the second value to display - WHERE PUT IT ?
 
                seriesItem.Name = contactsStatus;
                seriesItem.YValue = contactsAmount;
 
                if (contactsStatus.Equals("Ok"))
                {
                    seriesItem.BackgroundColor = Color.GreenYellow;
                    seriesItem.Exploded = true;                       
                }
                else
                {
                    seriesItem.BackgroundColor = Color.Red;
                    seriesItem.Exploded = true;
                }
 
                pieSeries.Items.Add(seriesItem);
            }
 
            RadHtmlChart1.PlotArea.Series.Add(pieSeries);
        }
}
Tom
Top achievements
Rank 2
 answered on 19 Jun 2014
3 answers
156 views
function checkEnter() {
if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Chrome') !== -1) {

if (event.keyCode === 13) {
var grid = $find("<%= rgClaimLines.ClientID %>");
if (grid) {
var EditItems = grid.get_editItems();
for (var i = 0; i < EditItems.length; i++) {
var editItem = EditItems[0];
var textBox = $(editItem.get_editFormItem()).find("input[id*='ddl_Paid']").get(0);
textBox.focus();
event.preventDefault();
return false;
}
}

The above function works perfectly on the first row of my grid, but fails on any subsequent rows....

Any ideas?

Regards
Marius

 }

}
Marius
Top achievements
Rank 1
 answered on 19 Jun 2014
4 answers
906 views
hi guys , hope u all doing fine , I really LOVE telerik it is amazing !! best job ever !! but I have a problem in my RadAsyncUpload :( , I have created a web application , it all works fine in my localhost , but when i upload it into my Host the RadAsyncUpload doesn't work !! it doesn't upload the file while in my localhost it uploads files and save it to the target folder and i get name and whatever i want from uploaded files !!
in the first two attached pics i showed what exactly happen and the end pic is the code .
Version : RadControls for ASP.NET AJAX Q2 2012
NOTE : I haven't use RadProgressArea or anything , what you see in the last pis is all which is the RadAsyncUpload alone .
Thank u so much for answering and helping :)

Peter Filipov
Telerik team
 answered on 19 Jun 2014
1 answer
298 views
Hi,

I've recently switched a site over tot he RadAsyncUpload module.  It works fine in my local development environment.  When I later go and install it in a testing environment I'm getting the an error message that states "Telerik.Web.UI.RadAsyncUpload does not implement IHttpModule".  I can't find anything online that addresses this specific error message.  Note that I'm deploying a precompiled web app.

My web config contains the following relevant keys:


<httpModules>
   <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule">
</httpModules>
<system.webServer>
   <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadAsyncUpload" />
      <add name="RadAsyncUpload" type="Telerik.Web.UI.RadAsyncUpload" preCondition="integratedMode" />
      <remove name="RadCompression" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedModle" />
   </modules>
</system.webServer>


Any thoughts or guidence would be greatly appreciated.
Nencho
Telerik team
 answered on 19 Jun 2014
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?