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

I'm using a RadGrid with a  GridTemplateColumn.  In my EditItemTemplate I place a RadDropDownList and I set the OnClientDropDownClosed event to a JS function. Everything has been working fine for quite a while.  Then after updating our project to 2017.1.228.45 the OnClientDropDownClosed event is now firing twice. 

 

This is a problem for the application because inside our OnClientDropDownClosed JS function we have a Confirm pop up.  When the event is fired twice Two pop up's get displayed on the UI. 

Any suggestions on how to correct this behavior?

Vessy
Telerik team
 answered on 30 Mar 2017
1 answer
94 views

I'm trying to automatically resize the rad window containing a rad editor when the rad editor changes size when AutoResizeHeight is true.

I've tried following the directions in: http://www.telerik.com/forums/what-event-is-fired-on-resize  but it doesn't appear that onResizeEnd is called when auto resizing.  Can I get some direction about what event to trap on so I can resize my Rad Window manually?  Or perhaps that is some other way to get the rad window with .AutoSize = true to automatically resize when rad editors in the window change size.

Thanks!

Michael
Top achievements
Rank 1
 answered on 30 Mar 2017
2 answers
240 views

Hello,

I'm using try version and I found two problem and would like your help.

1. My line disappears when I have more four sub items (see example)

2.This example is more difficult to explain because but I try. 

I have structure (see image  OrgChart4.PNG) and I need that my orgChart stay as OrgChart1.PNG, group by Header (like "Operacional") but some other "Operacional" groups name are in blank.

What is happening?

Regars,

Renato Vilela

 

List<Structure> lsStructure;
 
CreateOrg(lsStructure);
 
private void CreateOrg(List<Structure> lsStructure){
 
DataTable nodeTable = CreateNode(lsStructure);
            DataTable itemsTable = CreateItems(lsStructure);
 
            rocKAS.GroupEnabledBinding.NodeBindingSettings.DataFieldID = Support.GetMemberName((Structure c) => c.EnteID).ToString();
            rocKAS.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = Support.GetMemberName((Structure c) => c.EnteParentID).ToString();
            rocKAS.GroupEnabledBinding.NodeBindingSettings.DataSource = nodeTable;
 
            //Nome das Pessoas
            rocKAS.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = Support.GetMemberName((Structure c) => c.EnteID).ToString();
            rocKAS.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = Support.GetMemberName((Structure c) => c.DivisionID).ToString();
            rocKAS.RenderedFields.NodeFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "Division" });
            rocKAS.GroupEnabledBinding.GroupItemBindingSettings.DataSource = itemsTable;
 
            rocKAS.DataBind();
            rocKAS.CollapseAllNodes();
 
}
 
 
private DataTable CreateNode(List<Structure> lsStructure)
        {
            DataTable nodeTable = new DataTable();
            DataRow row;
 
            nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteID).ToString(), typeof(int));
            nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteParentID).ToString(), typeof(int));
            nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.DivisionID).ToString(), typeof(int));
            nodeTable.Columns.Add(Support.GetMemberName((Structure c) => c.Division).ToString(), typeof(string));
 
            foreach (var item in lsStructure)
            {
                row = nodeTable.NewRow();
                row[Support.GetMemberName((Structure c) => c.EnteID).ToString()] = item.EnteID;
                row[Support.GetMemberName((Structure c) => c.DivisionID).ToString()] = item.DivisionID;
                row[Support.GetMemberName((Structure c) => c.Division).ToString()] = item.Division;
 
                if(item.EnteParentID == 0)
                    row[Support.GetMemberName((Structure c) => c.EnteParentID).ToString()] = DBNull.Value;
                else
                    row[Support.GetMemberName((Structure c) => c.EnteParentID).ToString()] = item.EnteParentID;
 
                nodeTable.Rows.Add(row);
            }
 
            return nodeTable;
        }
 
        private DataTable CreateItems(List<Structure> lsStructure)
        {
            DataTable itemsTable = new DataTable();
            DataRow row;
 
            itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteID).ToString(), typeof(int));
            itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteParentID).ToString(), typeof(int));
            itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EntePosition).ToString(), typeof(string));
            itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.Division).ToString(), typeof(string));
            itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.DivisionID).ToString(), typeof(Int16));
            itemsTable.Columns.Add(Support.GetMemberName((Structure c) => c.EnteName).ToString(), typeof(string));
 
            foreach (var item in lsStructure)
            {
                row = itemsTable.NewRow();
                row[Support.GetMemberName((Structure c) => c.EnteID).ToString()] = item.EnteID;
                row[Support.GetMemberName((Structure c) => c.EnteParentID).ToString()] = item.EnteParentID;
                row[Support.GetMemberName((Structure c) => c.EntePosition).ToString()] = item.EntePosition;
                row[Support.GetMemberName((Structure c) => c.Division).ToString()] = item.Division;
                row[Support.GetMemberName((Structure c) => c.DivisionID).ToString()] = item.DivisionID;
                row[Support.GetMemberName((Structure c) => c.EnteName).ToString()] = item.EnteName;
                itemsTable.Rows.Add(row);
            }
 
            return itemsTable;
        }
Peter Milchev
Telerik team
 answered on 30 Mar 2017
5 answers
384 views

I have an excel export on my grid in which i export some balances.

Some of the balances are returned in big negative numbers from the database. I need to round them up so they don't show up as big negative numbers in excel.

They show fine in the grid. My column declarations are like:

<telerik:GridBoundColumn Aggregate="Sum" DataField="TransferDollars" HeaderText="Transfers" DataFormatString="{0:c2}"
                            UniqueName="Transfers" SortExpression="TransferDollars" AllowFiltering="false" HeaderStyle-Width="9%"
                            FooterStyle-HorizontalAlign="Right">
 
 </telerik:GridBoundColumn>

 

I change them to a currency format in my InfrastructureReporting event, how can i round them up before export.

protected virtual void grid_InfrastructureExporting(object sender, GridInfrastructureExportingEventArgs e)
        {
            foreach (xls.Row row in e.ExportStructure.Tables[0].Rows)
            {               
                row.Cells[2, row.Index].Format = "$#,##0.00;($#,##0.00)";
                row.Cells[3, row.Index].Format = "$#,##0.00;($#,##0.00)";
                row.Cells[4, row.Index].Format = "$#,##0.00;($#,##0.00)";
                row.Cells[5, row.Index].Format = "$#,##0.00;($#,##0.00)";               
                row.Cells[6, row.Index].Format = "$#,##0.00;($#,##0.00)";
                row.Cells[7, row.Index].Format = "$#,##0.00;($#,##0.00)";
                row.Cells[8, row.Index].Format = "$#,##0.00;($#,##0.00)";
                row.Cells[9, row.Index].Format = "$#,##0.00;($#,##0.00)";
            }
        }

 

How can I do this?
Marin Bratanov
Telerik team
 answered on 30 Mar 2017
1 answer
114 views

Hi Team,

I am implementing one application and in that i am using kendo map.

I have plotted bubbles on map. And i have added wraparound : true property.

My issue is when i am scrolling map to left or right side ,adjacent part of map is loading because i have used wraparound: true. But i can not see bubbles applied on same region. For example i have applied bubbles on few cities of US country. But when i am scrolling map to left or right side, new map get loaded, but i can not see any bubble on same cities of US.

How can i make visible those bubbles for everytime.

Thanks & Regards,

Amit

Stefan
Telerik team
 answered on 30 Mar 2017
1 answer
154 views

Hi all,

I´ve made a PivotGrid with Chart integration like the example on the demo page.
My output is a little bit different as the demo. See attached file. As you can see in the picture the chart was generated twice.

Do you know why?

Here is my code aspx:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/BdVNet.Master" AutoEventWireup="true" CodeBehind="Telefondaten.aspx.cs"
    Inherits="BdVNet.Content.Reporting.Telefondaten" %>
 
<asp:Content ID="ReportTelefonContent" ContentPlaceHolderID="BdVMasterContentPlaceHolder" runat="server">
 
    <telerik:RadAjaxManagerProxy ID="ReportTelefonAjaxManagerProxy" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ReportTelefonPivotGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ReportTelefonPivotGrid" />
                    <telerik:AjaxUpdatedControl ControlID="A1HtmlChart" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ReportTelefonZeitenPivotGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ReportTelefonZeitenPivotGrid" />
                    <telerik:AjaxUpdatedControl ControlID="A2HtmlChart" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
    <div class="box">
        <telerik:RadTabStrip ID="ReportTelefonTabStrip" runat="server" MultiPageID="ReportTelefonMultiPage" SelectedIndex="0" Enabled="true"
            RenderMode="<%$ Resources:Einstellungen, RenderMode %>">
            <Tabs>
                <telerik:RadTab runat="server" Text="Auswertung 1" Selected="true" />
                <telerik:RadTab runat="server" Text="Auswertung 2" />
            </Tabs>
        </telerik:RadTabStrip>
 
        <telerik:RadMultiPage ID="ReportTelefonMultiPage" runat="server" SelectedIndex="0" Enabled="true" RenderMode="<%$ Resources:Einstellungen, RenderMode %>">
 
            <telerik:RadPageView ID="ReportTelefonA1PageView" runat="server">
                <telerik:RadPivotGrid ID="ReportTelefonPivotGrid" runat="server" OnNeedDataSource="ReportTelefonPivotGrid_NeedDataSource"
                    ShowDataHeaderZone="false" ShowFilterHeaderZone="false" TotalsSettings-ColumnGrandTotalsPosition="None" Culture="de-DE"
                    RenderMode="<%$ Resources:Einstellungen, RenderMode %>" ColumnGroupsDefaultExpanded="false" OnCellDataBound="ReportTelefonPivotGrid_CellDataBound"
                    EnableConfigurationPanel="false">
                    <Fields>
                        <telerik:PivotGridRowField DataField="MitarbeiterDIMENSION_LONG" Caption="Abteilung" CellStyle-Width="150" ZoneIndex="0" />
                        <telerik:PivotGridRowField DataField="Name" Caption="Mitarbeiter" CellStyle-Width="150" />
                        <telerik:PivotGridColumnField DataField="Jahr" Caption="Jahr" />
                        <telerik:PivotGridColumnField DataField="Monat" Caption="Monat" />
                        <telerik:PivotGridColumnField DataField="Art" Caption="Art" />
                        <telerik:PivotGridAggregateField DataField="Dauer" DataFormatString="{0:N0}" Aggregate="Count">
                            <HeaderCellTemplate>
                                Anzahl
                            </HeaderCellTemplate>
                        </telerik:PivotGridAggregateField>
                        <telerik:PivotGridAggregateField DataField="DauerSek" DataFormatString="{0:N0}">
                            <HeaderCellTemplate>
                                Dauer
                            </HeaderCellTemplate>
                            <CellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </CellTemplate>
                            <RowTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </RowTotalCellTemplate>
                            <RowGrandTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </RowGrandTotalCellTemplate>
                            <ColumnTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </ColumnTotalCellTemplate>
                            <ColumnGrandTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </ColumnGrandTotalCellTemplate>
                        </telerik:PivotGridAggregateField>
                    </Fields>
                    <ConfigurationPanelSettings Position="Left" DefaultDeferedLayoutUpdate="true" />
                </telerik:RadPivotGrid>
 
                <telerik:RadHtmlChart ID="A1HtmlChart" runat="server" RenderMode="<%$ Resources:Einstellungen, RenderMode %>" Legend-Appearance-Position="Top"
                    PlotArea-YAxis-LabelsAppearance-DataFormatString="N0" PlotArea-XAxis-LabelsAppearance-RotationAngle="45">
                    <Appearance>
                        <FillStyle BackgroundColor="Transparent" />
                    </Appearance>
                    <ChartTitle Text="Telefondaten">
                        <Appearance Align="Center" BackgroundColor="Transparent" Position="Top" />
                    </ChartTitle>
                </telerik:RadHtmlChart>
            </telerik:RadPageView>
 
            <telerik:RadPageView ID="ReportTelefonA2PageView" runat="server">
                <telerik:RadPivotGrid ID="ReportTelefonZeitenPivotGrid" runat="server" OnNeedDataSource="ReportTelefonZeitenPivotGrid_NeedDataSource"
                    ShowDataHeaderZone="false" ShowFilterHeaderZone="false" TotalsSettings-ColumnGrandTotalsPosition="None" Culture="de-DE"
                    RenderMode="<%$ Resources:Einstellungen, RenderMode %>" ColumnGroupsDefaultExpanded="false" OnCellDataBound="ReportTelefonZeitenPivotGrid_CellDataBound"
                    EnableConfigurationPanel="false">
                    <Fields>
                        <telerik:PivotGridRowField DataField="Wochentag" Caption="Wochentag" CellStyle-Width="100" />
                        <telerik:PivotGridRowField DataField="Stunde" Caption="Stunde" CellStyle-Width="100" ZoneIndex="0" />
                        <telerik:PivotGridRowField DataField="BN_Telefon_Nebenstelle_1" Caption="Nebenstelle" CellStyle-Width="150" ZoneIndex="0" />
                        <telerik:PivotGridColumnField DataField="Jahr" Caption="Jahr" />
                        <telerik:PivotGridColumnField DataField="Monat" Caption="Monat" />
                        <telerik:PivotGridColumnField DataField="Art" Caption="Art" />
                        <telerik:PivotGridAggregateField DataField="Dauer" DataFormatString="{0:N0}" Aggregate="Count">
                            <HeaderCellTemplate>
                                Anzahl
                            </HeaderCellTemplate>
                        </telerik:PivotGridAggregateField>
                        <telerik:PivotGridAggregateField DataField="DauerSek" DataFormatString="{0:N0}">
                            <HeaderCellTemplate>
                                Dauer
                            </HeaderCellTemplate>
                            <CellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </CellTemplate>
                            <RowTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </RowTotalCellTemplate>
                            <RowGrandTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </RowGrandTotalCellTemplate>
                            <ColumnTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </ColumnTotalCellTemplate>
                            <ColumnGrandTotalCellTemplate>
                                <%# (Convert.ToInt64(Container.DataItem) == 0) ? "" : string.Format("{0:d2}:{1:d2}:{2:d2}", (Convert.ToInt64(Container.DataItem)/3600) , (Convert.ToInt64(Container.DataItem)%3600)/60 , (Convert.ToInt64(Container.DataItem)%3600)%60) %>
                            </ColumnGrandTotalCellTemplate>
                        </telerik:PivotGridAggregateField>
                    </Fields>
                    <ConfigurationPanelSettings Position="Left" DefaultDeferedLayoutUpdate="true" />
                </telerik:RadPivotGrid>
 
                <telerik:RadHtmlChart ID="A2HtmlChart" runat="server" RenderMode="<%$ Resources:Einstellungen, RenderMode %>" Legend-Appearance-Position="Top"
                    PlotArea-YAxis-LabelsAppearance-DataFormatString="N0" PlotArea-XAxis-LabelsAppearance-RotationAngle="45">
                    <Appearance>
                        <FillStyle BackgroundColor="Transparent" />
                    </Appearance>
                    <ChartTitle Text="Telefondaten">
                        <Appearance Align="Center" BackgroundColor="Transparent" Position="Top" />
                    </ChartTitle>
                </telerik:RadHtmlChart>
            </telerik:RadPageView>
 
        </telerik:RadMultiPage>
 
    </div>
 
</asp:Content>

 

and c#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Text;
 
namespace BdVNet.Content.Reporting
{
    public partial class Telefondaten : System.Web.UI.Page
    {
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            ReportTelefonPivotGrid.ColumnGroupsDefaultExpanded = false;
            ReportTelefonPivotGrid.RowGroupsDefaultExpanded = false;
            ReportTelefonPivotGrid.Rebind();
 
            base.OnPreRender(e);
            ReportTelefonZeitenPivotGrid.ColumnGroupsDefaultExpanded = false;
            ReportTelefonZeitenPivotGrid.RowGroupsDefaultExpanded = false;
            ReportTelefonZeitenPivotGrid.Rebind();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            string currentYear = DateTime.Now.Year.ToString();
            string currentMonth = String.Format(format: "{0:MM}", arg0: DateTime.Now);
 
            if (Code.AccessControl.UserAdminAccessIsValid == true || Code.AccessControl.UserMgmAccessIsValid == true)
            {
                var menuSelect = (RadMenu)Master.FindControl(id: "BdVMasterMenu");
                menuSelect.Items[2].Items[1].Selected = true;
            }
            else
            {
                Response.Redirect(url: "../Geschaeft.aspx");
            }
 
            Label masterPageTextLabel;
            masterPageTextLabel = (Label)Master.FindControl("BdVMasterTextLabel");
            masterPageTextLabel.Text = "Reporting | Telefonanlage";
 
            if (!IsPostBack)
            {
                ReportTelefonPivotGrid.CollapsedColumnIndexes.Add(new object[] { currentYear });
                ReportTelefonZeitenPivotGrid.CollapsedColumnIndexes.Add(new object[] { currentYear });
                //ReportTelefonPivotGrid.CollapsedColumnIndexes.Add(new object[] { currentMonth });
            }
        }
 
        protected void ReportTelefonPivotGrid_NeedDataSource(object sender, Telerik.Web.UI.PivotGridNeedDataSourceEventArgs e)
        {
            string sqlSelectCommand = "SELECT * FROM [BN_R_Telefonanlage] WHERE Name != ''";
 
            var adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["BdVNet"].ConnectionString);
 
            DataTable myDataTable = new DataTable();
 
            adapter.Fill(myDataTable);
            ReportTelefonPivotGrid.DataSource = myDataTable;
        }
 
        HashSet<string> columnNames = new HashSet<string>();
        Dictionary<string, ColumnSeries> columnSeriesByRowName = new Dictionary<string, ColumnSeries>();
        protected void ReportTelefonPivotGrid_CellDataBound(object sender, PivotGridCellDataBoundEventArgs e)
        {
            PivotGridDataCell dataCell = e.Cell as PivotGridDataCell;
 
            if (columnNames.Count == 0)
            {
                this.A1HtmlChart.PlotArea.XAxis.Items.Clear();
                this.A1HtmlChart.PlotArea.Series.Clear();
            }
 
            if (dataCell != null && dataCell.CellType == PivotGridDataCellType.DataCell)
            {
                string rowName = GetName(dataCell.ParentRowIndexes);
                string columnName = GetName(dataCell.ParentColumnIndexes);
                columnName = columnName.Replace('\'', ' ');
 
                if (columnNames.Add(columnName))
                {
                    AxisItem axisItem = new AxisItem(columnName);
                    this.A1HtmlChart.PlotArea.XAxis.Items.Add(axisItem);
                }
 
                ColumnSeries columnSeries = null;
 
                if (columnSeriesByRowName.ContainsKey(rowName))
                {
                    columnSeries = columnSeriesByRowName[rowName];
                    columnSeries.LabelsAppearance.DataFormatString = "N2";
                    //columnSeries.LabelsAppearance.ClientTemplate = "test #=value#";
                }
                else
                {
                    columnSeries = new ColumnSeries();
                    columnSeriesByRowName.Add(rowName, columnSeries);
                    columnSeries.Name = rowName;
                    columnSeries.LabelsAppearance.DataFormatString = "N0";
                    this.A1HtmlChart.PlotArea.Series.Add(columnSeries);
                }
                 
                CategorySeriesItem item = new CategorySeriesItem();
                 
                decimal value = 0;
 
                if (e.Cell.DataItem != null && decimal.TryParse(e.Cell.DataItem.ToString(), out value))
                {
                    if (value != 0)
                    {
                        if (columnName.Contains("Dauer"))
                        {
                            item.Y = value / 3600;
                        }
                        else
                        {
                            item.Y = value;
                        }
                    }
                }
                else
                {
                    item.Y = null;
                }
                 
                columnSeries.SeriesItems.Add(item);
            }
        }
 
        private string GetName(object[] indexes)
        {
            StringBuilder builder = new StringBuilder();
 
            foreach (object index in indexes)
            {
                builder.Append(index.ToString());
                builder.Append(" | ");
            }
 
            builder.Remove(builder.Length -3, 3);
            builder.Replace("Count of Dauer", "Anzahl");
            builder.Replace("Sum of DauerSek", "Dauer");
 
            return builder.ToString();
        }
 
        protected void ReportTelefonZeitenPivotGrid_NeedDataSource(object sender, PivotGridNeedDataSourceEventArgs e)
        {
            string sqlSelectCommand = "SELECT * FROM [BN_R_Telefonanlage] WHERE Name IS NULL";
 
            var adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["BdVNet"].ConnectionString);
 
            DataTable myDataTable = new DataTable();
 
            adapter.Fill(myDataTable);
            ReportTelefonZeitenPivotGrid.DataSource = myDataTable;
        }
 
        protected void ReportTelefonZeitenPivotGrid_CellDataBound(object sender, PivotGridCellDataBoundEventArgs e)
        {
            PivotGridDataCell dataCell = e.Cell as PivotGridDataCell;
 
            if (columnNames.Count == 0)
            {
                this.A2HtmlChart.PlotArea.XAxis.Items.Clear();
                this.A2HtmlChart.PlotArea.Series.Clear();
            }
 
            if (dataCell != null && dataCell.CellType == PivotGridDataCellType.DataCell)
            {
                string rowName = GetName(dataCell.ParentRowIndexes);
                string columnName = GetName(dataCell.ParentColumnIndexes);
                columnName = columnName.Replace('\'', ' ');
 
                if (columnNames.Add(columnName))
                {
                    AxisItem axisItem = new AxisItem(columnName);
                    this.A2HtmlChart.PlotArea.XAxis.Items.Add(axisItem);
                }
 
                ColumnSeries columnSeries = null;
 
                if (columnSeriesByRowName.ContainsKey(rowName))
                {
                    columnSeries = columnSeriesByRowName[rowName];
                    columnSeries.LabelsAppearance.DataFormatString = "N2";
                    //columnSeries.LabelsAppearance.ClientTemplate = "test #=value#";
                }
                else
                {
                    columnSeries = new ColumnSeries();
                    columnSeriesByRowName.Add(rowName, columnSeries);
                    columnSeries.Name = rowName;
                    columnSeries.LabelsAppearance.DataFormatString = "N0";
                    this.A2HtmlChart.PlotArea.Series.Add(columnSeries);
                }
 
                CategorySeriesItem item = new CategorySeriesItem();
 
                decimal value = 0;
 
                if (e.Cell.DataItem != null && decimal.TryParse(e.Cell.DataItem.ToString(), out value))
                {
                    if (value != 0)
                    {
                        if (columnName.Contains("Dauer"))
                        {
                            item.Y = value / 3600;
                        }
                        else
                        {
                            item.Y = value;
                        }
                    }
                }
                else
                {
                    item.Y = null;
                }
 
                columnSeries.SeriesItems.Add(item);
            }
        }
    }
}

 

Many thanks in advance

Andreas

 

Peter Milchev
Telerik team
 answered on 30 Mar 2017
0 answers
87 views

Dear all, 

 

Is there any way to change the background color of the children tasks based on the data in the database?

I need to have different background colors alerting the user of the task's status (overdue, on track, completed). I appreciate your time.

 

Regards,

Marija

Marija
Top achievements
Rank 1
 asked on 30 Mar 2017
3 answers
227 views

My project still uses Telerik v2011.1.413.35 and came across an issue with the recurrence editor. Here are the settings:

Recurrence: Hourly
Recur every: 1 hr
Repeat end: End By
End by: 10/3/2018

The above setting when configured in UI or preset at Page_Load always generates and stops at only 3000 occurrences. I tried setting/overriding RadSchedulerRecurrenceEditor.RecurrenceRule.MaximumCandidates and RadSchedulerRecurrenceEditor.RecurrenceRule.Range.MaxOccurrences during Page_Load or on click/submit of form, before accessing Occurrences property, as suggested in these forum topics: Link 1, Link 2. That does not work.

So, I went ahead and installed the latest Telerik UI for ASP.NET AJAX, and tried the same experiement a fresh, simple page that only has the recurrence editor, and still does not work. Below is the code snippet, both ASPX and VB page.

01.<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RecurrenceEditor.aspx.vb" Inherits="RecurrenceEditor" %>
02. 
03.<!DOCTYPE html>
04. 
06.<head runat="server">
07.    <title></title>
08.    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
09.</head>
10.<body>
11.    <form id="form1" runat="server">
12.        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
13.        <asp:Panel ID="pnlRadRecurrenceEditorTest" runat="server" CssClass="ssection" Width="600">
14.            <telerik:RadSchedulerRecurrenceEditor ID="radRecurEditor" runat="server"></telerik:RadSchedulerRecurrenceEditor>
15.            <asp:Button ID="btnRadRecurrenceEditorSubmit" runat="server" Text="Schedule Submit" /><br />
16.            <asp:Label ID="lblRadRecurrenceEditorDetails" runat="server"></asp:Label>
17.        </asp:Panel>
18.    </form>
19.</body>
20.</html>
01.Imports Telerik.Web.UI
02. 
03.Partial Class RecurrenceEditor
04.    Inherits System.Web.UI.Page
05. 
06.    Protected Sub Page_Load_Recurrence(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
07.        lblRadRecurrenceEditorDetails.Text = String.Empty
08.        If IsPostBack Then Exit Sub
09.        'NOTE: With or without the below code commented, I cannot get occcurrences > 3000 in count
10.        Dim endDate As New Date(2018, 10, 4)
11.        radRecurEditor.StartDate = Now()
12.        radRecurEditor.EndDate = endDate
13.        radRecurEditor.RecurrenceRule = New HourlyRecurrenceRule(1, New RecurrenceRange(Now(), TimeSpan.Zero, endDate, 0))
14.        radRecurEditor.RecurrenceRule.Range.MaxOccurrences = 10002
15.        radRecurEditor.RecurrenceRule.MaximumCandidates = 10001
16.        lblRadRecurrenceEditorDetails.Text += "<br>Max occurrences: " & radRecurEditor.RecurrenceRule.Range.MaxOccurrences.ToString()
17.        lblRadRecurrenceEditorDetails.Text += "<br>Max candidates: " & radRecurEditor.RecurrenceRule.MaximumCandidates.ToString()
18.    End Sub
19.    Protected Sub btnRadRecurrenceEditorSubmit_Click(sender As Object, e As EventArgs) Handles btnRadRecurrenceEditorSubmit.Click
20.        Dim output As New List(Of String)
21.        output.Add("Max candidates: " & radRecurEditor.RecurrenceRule.MaximumCandidates.ToString())
22.        radRecurEditor.RecurrenceRule.MaximumCandidates = 10000 'doesn't work
23.        output.Add("Max candidates changed to: " & radRecurEditor.RecurrenceRule.MaximumCandidates)
24.        output.Add("Max occurrences: " & radRecurEditor.RecurrenceRule.Range.MaxOccurrences.ToString())
25.        output.Add("ToList count: " & radRecurEditor.RecurrenceRule.Occurrences.ToList().Count)
26.        output.Add("Total count: " & radRecurEditor.RecurrenceRule.Occurrences.Count)
27.        output.Add("Last recurring date: " & radRecurEditor.RecurrenceRule.Occurrences.LastOrDefault())
28.        lblRadRecurrenceEditorDetails.Text = String.Join("<br>", output)
29.    End Sub
30. 
31.End Class

 

I have also attached the resultant page view.

Let me know what I'm doing wrong here, or if this is an actual bug in the tool.

Thanks.

Peter Milchev
Telerik team
 answered on 30 Mar 2017
1 answer
129 views

Hi

    I want to use RadCombo Box inside Rad grid and to use Multiselect combo using Checkboxes,By the major Issue is i am not getting the grid when I use the below code and the comboBox is displayes in front of all columns,While doing Crud operations the ComboBox column is not showing but is show a textbox

Here is my Design:

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Telerik" />

        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecorationZoneID="demo" DecoratedControls="All" EnableRoundedCorners="false" />
        <div>
            <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" GridLines="None" AutoGenerateColumns="false" PageSize="10"
                AllowPaging="true" AllowSorting="true" runat="server" DataSourceID="SqlDataSource2" OnItemDataBound="RadGrid1_ItemDataBound" 
                AllowAutomaticUpdates="true" AllowAutomaticInserts="True" >
                <MasterTableView ShowFooter="false" DataKeyNames="Empid" EditMode="InPlace" CommandItemDisplay="TopAndBottom">
                    <Columns>
                        <telerik:GridBoundColumn DataField="EmpId" HeaderText="EmpId"
                            HeaderStyle-Width="300px" ItemStyle-Width="300px" />

                        <telerik:GridBoundColumn DataField="EmpName" HeaderText="EmployeeName"
                            HeaderStyle-Width="300px" ItemStyle-Width="300px" />


                        <telerik:GridBoundColumn HeaderText="Skills" DataField="CategoryName">
                            <FilterTemplate>
                            
                            
                                <telerik:RadComboBox ID="RadCombobox1" runat="server">
                                </telerik:RadComboBox>
                            

                                
                                <%# Eval("CategoryName")%>
                            </ItemTemplate>
                                </FilterTemplate>
                        </telerik:GridBoundColumn>




                        




                        <telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn"
                            HeaderText="Edit" HeaderStyle-Width="100px" UpdateText="Update">
                        </telerik:GridEditCommandColumn>



                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

 

 

 

Marin Bratanov
Telerik team
 answered on 30 Mar 2017
1 answer
157 views

I am having the following problem.  I am doing the excel type Filter (FilterType="HederContext").  All the filtering options work except for the list box combo.  I am retrieving the list box options (and they display), but when I check to filter one of them it does not filter any of the data elements.  I can use the sort ascending/descending/add & remove columns.  Start by and equals.  

I just cannot use any fields in the combo box.

Here is the code sample:

 

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/WebForms.master" AutoEventWireup="true" CodeBehind="PostageReport.aspx.cs" Inherits="Site.Areas.Reports.PostageReport.PostageReport" %>
 
<asp:Content ID="Content7" ContentPlaceHolderID="ContentBottom" runat="server">
    Date From:
    <asp:Label runat="server" Visible="true" ID="lblDf"></asp:Label><br />
    Date To:
    <asp:Label runat="server" Visible="true" ID="lblDt"></asp:Label>
 
<%--    <telerik:RadScriptManager ID ="RadScriptManager1" runat="server" />--%>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" EnableAJAX="true" LoadingPanelID="LoadingPanel1">
        <telerik:RadGrid ID="RadGrid1" runat="server" RenderMode="Lightweight"
            AllowFilteringByColumn="true"
            FilterType="HeaderContext"
            EnableHeaderContextMenu="true"
            EnableHeaderContextFilterMenu="true"
            EnableFiltering="true"
            AllowPaging="True"
            PagerStyle-AlwaysVisible="true"
            AllowSorting="true"
            GroupingEnabled="true"
            OnNeedDataSource="RadGrid1_NeedDataSource" 
            OnFilterChecklistItemsRequested="RadGrid1_FilterCheckListItemsRequested">
            <MasterTableView AutoGenerateColumns="false" DataKeyNames="new_entrynumber" AllowFilteringByColumn="true" AllowSorting="true" OverrideDataSourceControlSorting="true">
                <Columns>
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_entrydate" DataFormatString="{0:d}" FilterControlWidth="45px" DataType="System.DateTime" HeaderText="Date" UniqueName="Date"></telerik:GridBoundColumn>
                  
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_customernumberid" FilterControlWidth="45px" DataType="System.String" HeaderText="Account Number" UniqueName="CustomerNumber"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_costcenter" FilterControlWidth="45px" DataType="System.String" HeaderText="Cost Center" UniqueName="CostCenter"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_installname" FilterControlWidth="45px" DataType="System.String" HeaderText="Customer Name" UniqueName="CustomerName"></telerik:GridBoundColumn>
                  
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_installcity" FilterControlWidth="45px" DataType="System.String" HeaderText="City" UniqueName="City"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_installstate" FilterControlWidth="30px" DataType="System.String" HeaderText="State" UniqueName="State"></telerik:GridBoundColumn>
                     
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_serialnumber" FilterControlWidth="45px" DataType="System.String" HeaderText="Serial Number" UniqueName="SerialNumber"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="new_entrydescription" FilterControlWidth="45px" DataType="System.String" HeaderText="Description" UniqueName="TransDescription"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="new_entryamount"  DataFormatString="{0:N}" FilterControlWidth="45px" HeaderText="Amount" UniqueName="TransAmount">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="new_numberimprints"  FilterControlWidth="45px" DataType="System.Decimal" HeaderText="Total Piece Count" UniqueName="TotalPieceCount">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="new_postageused" DataFormatString="{0:N}"  FilterControlWidth="45px" DataType="System.Decimal" HeaderText="Total Postage Used" UniqueName="TotalPostageUsed">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="new_endingcredit" DataFormatString="{0:N}"  FilterControlWidth="45px" DataType="System.Decimal" HeaderText="Ending Credit" UniqueName="EndingCredit">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" />
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
 
    <%--<CommandItemSettings ShowAddNewRecordButton="False" ShowExportToCsvButton="True" ShowExportToExcelButton="True" ShowExportToPdfButton="True" ShowExportToWordButton="True" />--%>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Scripts" runat="server">
</asp:Content>

 

C# code behind it:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Site.Pages;
using Telerik.Web.UI;
using Xrm;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using System.Data;
using System.Globalization;
using System.Threading;
 
 
namespace Site.Areas.Reports.PostageReport
{
    public partial class PostageReport : PortalPage
    {
        private DateTime df;
        private DateTime dt;
        private string _guid;
 
        public void Button2_Click(object sender, ImageClickEventArgs e)
        {
            // TODO: Implement this method
            throw new NotImplementedException();
        }
 
        public void RadGrid1_SortCommand(object sender, GridSortCommandEventArgs e)
        {
            // TODO: Implement this method
            throw new NotImplementedException();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            RedirectToLoginIfAnonymous();
        }
 
        protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            (sender as RadGrid).DataSource = GetDataTable();
        }
 
        protected void RadGrid1_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e)
        {
            string DataField = (e.Column as IGridDataColumn).GetActiveDataField();
 
            e.ListBox.DataSource = GetDistinctColumn(DataField);
            e.ListBox.DataKeyField = DataField;
            e.ListBox.DataTextField = DataField;
            e.ListBox.DataValueField = DataField;
            e.ListBox.DataBind();
        }
 
        public void ParseParameters()
        {
            if (Request.QueryString["df"] != null) {
                df = Convert.ToDateTime(Request.QueryString["df"]).AddDays(1).AddDays(-1);
            } else {
                // Default is from date two years back
                df = DateTime.Today.AddDays(-730);
            }
 
            if (Request.QueryString["dt"] != null) {
                dt = Convert.ToDateTime(Request.QueryString["dt"]).AddDays(1).AddTicks(-1);
            } else {
                df = DateTime.Today;
            }
 
             
            if (Request.QueryString["id"] != null) {
                _guid = Request.QueryString["id"];
            }else {
                _guid = "all";
            }
        }
 
 
        public DataTable GetDistinctColumn(string columnName)
        {
            DataTable dTable = new DataTable();
            var xrm = new Xrm.XrmServiceContext("Xrm");
 
            ParseParameters();
 
            lblDf.Text = df.ToShortDateString();
            lblDt.Text = dt.ToShortDateString();
 
            Xrm.Account account = new Xrm.Account();
             
            if (_guid == "all")
            {
                account = xrm.Retrieve(Xrm.Account.EntityLogicalName, Contact.ParentCustomerId.Id, new ColumnSet(true)).ToEntity<Xrm.Account>();
 
            }
            else
            {
                Guid _account = new Guid(_guid);
                account = xrm.Retrieve(Xrm.Account.EntityLogicalName, _account, new ColumnSet(true)).ToEntity<Xrm.Account>();
            }
 
            dTable.Columns.Add(columnName);
 
            QueryExpression query = new QueryExpression();
            query.EntityName = "new_tdcdata";
            query.ColumnSet.AddColumn(columnName);
            query.Distinct = true;
 
            query.Criteria = new Microsoft.Xrm.Sdk.Query.FilterExpression();
            if (_guid == "all")
            {
                query.Criteria.AddCondition("new_account",ConditionOperator.Equal,account.Id);
            } else {
                query.Criteria.AddCondition("new_customernumberid",ConditionOperator.Equal,account.Id);
            }
 
            Microsoft.Xrm.Sdk.Query.FilterExpression childFilter = query.Criteria.AddFilter(LogicalOperator.And);
            childFilter.AddCondition("new_entrydate", ConditionOperator.Between, df, dt);
 
            EntityCollection results = xrm.RetrieveMultiple(query);
 
            foreach (var c in results.Entities)
            {
                DataRow row = dTable.NewRow();
                if (columnName == "new_entrydate")
                {
                    row[columnName] = c.GetAttributeValue<DateTime>(columnName).ToString("M/dd/yyyy", CultureInfo.InvariantCulture);
                }
                else
                {
                    if (columnName == "new_customernumberid")
                    {
                        Guid _account = c.GetAttributeValue<Guid>(columnName);
                        account = xrm.Retrieve(Xrm.Account.EntityLogicalName, _account, new ColumnSet(true)).ToEntity<Xrm.Account>();
                        row[columnName] = account.Name;
                    }
                    else
                    {
                        row[columnName] = c.GetAttributeValue<string>(columnName);
 
                    }
                }
                dTable.Rows.Add(row);
            }
                         
            return (dTable);
        }
 
 
        public DataTable GetDataTable()
        {
 
            DataTable dTable = new DataTable();
            var xrm = new Xrm.XrmServiceContext("Xrm");
           
            ParseParameters();
 
            lblDf.Text = df.ToShortDateString();
            lblDt.Text = dt.ToShortDateString();
 
            Xrm.Account account = new Xrm.Account();
 
            if (_guid == "all")
            {
                account = xrm.Retrieve(Xrm.Account.EntityLogicalName, Contact.ParentCustomerId.Id, new ColumnSet(true)).ToEntity<Xrm.Account>();
 
            }
            else
            {
                Guid _account = new Guid(_guid);
                account = xrm.Retrieve(Xrm.Account.EntityLogicalName, _account, new ColumnSet(true)).ToEntity<Xrm.Account>();
            }
             
            RadGrid1.ExportSettings.FileName = string.Format("{0}-{1}-{2}-{3}-{4}",
                                                             "PostageReport",
                                                             account.Name,
                                                             df.ToShortDateString().Replace("/", ""),
                                                             dt.ToShortDateString().Replace("/", ""),
                                                             DateTime.Now.ToString("yyyyMMddHHmmss"));
 
 
            dTable.Columns.Add("new_entrynumber", typeof(Int32));
            dTable.Columns.Add("new_entrydate", typeof(DateTime));
            dTable.Columns.Add("new_account");
            dTable.Columns.Add("new_customernumberid");
            dTable.Columns.Add("new_costcenter");
            dTable.Columns.Add("new_installname");
            dTable.Columns.Add("new_installaddress");
            dTable.Columns.Add("new_installcity");
            dTable.Columns.Add("new_installstate");
            dTable.Columns.Add("new_installzip");
            dTable.Columns.Add("new_serialnumber");
            dTable.Columns.Add("new_entrydescription");
            dTable.Columns.Add("new_entryamount",typeof(decimal));
            dTable.Columns.Add("new_startingcredit", typeof(decimal));
            dTable.Columns.Add("new_startingdebit", typeof(decimal));
            dTable.Columns.Add("new_entrychecknumber");
            dTable.Columns.Add("new_numberimprints",typeof(Int32));
            dTable.Columns.Add("new_postageused", typeof(decimal));
            dTable.Columns.Add("new_endingcredit", typeof(decimal));
            dTable.Columns.Add("new_endingdebit", typeof(decimal));
            //dTable.Columns.Add("Price Group");
 
            IQueryable<new_tdcdata> stmt; //xrm.new_tdcdataSet.Where(t => t.new_Account.Id == account.Id);
            if (_guid == "all")
            {
                stmt = xrm.new_tdcdataSet.Where(t => t.new_Account.Id == account.Id && t.new_entryDate >= df && t.new_entryDate <= dt);
            }
            else
            {
                stmt = xrm.new_tdcdataSet.Where(t => t.new_CustomerNumberId.Id == account.Id && t.new_entryDate >= df && t.new_entryDate <= dt);
            }
 
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
            Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyNegativePattern = 1;
             
            foreach (var s in stmt)
            {
                // List<string> row = new List<string>();
                DataRow row = dTable.NewRow();
                row["new_entrynumber"] = s.new_entryNumber;
                row["new_entrydate"] = s.new_entryDate;
                row["new_account"] = (s.new_Account.Name ?? "");
                row["new_customernumberid"] = (s.new_CustomerNumberId.Name ?? "");
                row["new_costcenter"] = (s.new_CostCenter ?? "");
                row["new_installname"] = (s.new_InstallName ?? "");
                row["new_installaddress"] = (s.new_InstallAddress ?? "");
                row["new_installcity"] =(s.new_InstallCity ?? "");
                row["new_installstate"] = (s.new_InstallState ?? "");
                row["new_installzip"] = (s.new_InstallZip ?? "");
                row["new_serialnumber"] = (s.new_serialNumber ?? "n/a");
                //row.Add(string.Format("{0} {1}", s.new_entryDescription ?? "", s.new_entryDescription2 ?? ""));
                row["new_entrydescription"] = (string.Format("{0}", s.new_entryDescription ?? ""));
                row["new_entryamount"] = s.new_entryAmount;
                row["new_startingcredit"] = s.new_startingCredit;
                row["new_startingdebit"] =  s.new_startingDebit;
                row["new_entrychecknumber" ] = (s.new_entryCheckNumber ?? "--");
                row["new_numberimprints"] = s.new_numberImprints;
                row["new_postageused"] = s.new_postageUsed;
                row["new_endingcredit"] = s.new_endingCredit;
                row["new_endingdebit"] = s.new_endingDebit;
 
                dTable.Rows.Add(row);
            }
 
 
            return (dTable);
 
        }
    }
}
Eyup
Telerik team
 answered on 30 Mar 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?