Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
183 views

We are doing a POC project using Telerik RadOrgChart following are the issues we are facing please advise.

1. with 5k records (single hierarchy) we loaded RadOrgchart it took around 15 to 20 mins to load the chart. 

Example : CEO -> 5k employess directly reporting him. CEO is the parent node and 5k employess are under him in single line. It is just an example and we  have multi tier reporting as well. I have used loadondemand feature also but it didn't help.

2. Is there any way we can group 5k employees to avoid horizontal scroll. You can imagine how long scroll would have expand. We don't have ColumnGroupCount to play around.

3. Without calling server code, can telerik manage to  search the data in loaded view ? I know we can manage this using script techniques. It would be great to know if telerik has in-builtin feature like this.

Peter Milchev
Telerik team
 answered on 23 Jun 2020
1 answer
145 views

I am unable to get the animation for the panel bar to work in my application.  I literally copied the Demo and still the animation does not work.  I do not understand what is missing.  Clicking on the arrows neither collapses or expands.  It is as if the "click" never happens.

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ActivityDetails.aspx.cs" Inherits="ActivityWebApp.ActivityDetails" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageScripts_Header" runat="server">
    <style>
.aspNetDisabled {
    color: #b6bac1 !important;
    text-decoration: none;
}
.inline-rb input[type="radio"] {
            width: auto;
            margin: 10px;
}
.selected {
        font-weight: bold;
}
ol {
  list-style:none;
  counter-reset:mycounter;
  padding:0;
}
ol li {
  position:relative; 
  margin-left: 30px;
  padding-bottom: 2px;
  line-height:15px;
}
ol li:before {
  content:counter(mycounter); 
  counter-increment:mycounter;
  position:absolute;
  top:0;
  left:-30px;
  width:15px;
  height:15px;
  line-height:15px;
  border-radius:50%;
  color:#fff;
  background:teal;
  text-align:center;
}

</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadPlaceholder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div style="padding:40px">&nbsp;</div>

    <hr /> 
  <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-thin">
        <telerik:RadPanelBar RenderMode="Lightweight" runat="server" ID="RadPanelBar1" Width="100%" ExpandMode="MultipleExpandedItems">
            <Items>
                <telerik:RadPanelItem Expanded="True" Text="ASP.NET controls">
                    <Items>
                        <telerik:RadPanelItem Text="RadMenu" />
                        <telerik:RadPanelItem Text="RadTabStrip" />
                        <telerik:RadPanelItem Text="RadPanelBar" />
                        <telerik:RadPanelItem Text="RadpanelBar" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="WinForms controls">
                    <Items>
                        <telerik:RadPanelItem Text="RadMenustrip" />
                        <telerik:RadPanelItem Text="RadTabStrip" />
                        <telerik:RadPanelItem Text="RadToolStrip" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Other projects">
                    <Items>
                        <telerik:RadPanelItem Text="SiteFinity" />
                        <telerik:RadPanelItem Text="Reporting" />
                        <telerik:RadPanelItem Text="RadAjax" />
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    </div>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="PageScripts_Footer" runat="server">
    <script>
        
    </script>
</asp:Content>

Peter Milchev
Telerik team
 answered on 22 Jun 2020
0 answers
81 views

I am trying to allow panning, instead chart is trying to fit everything at set width.

Please help!

 <telerik:RadHtmlChart runat="server" ID="chartChangeInJobs" 
                                Height="350" Width="100%"
                                Transitions="true"  Skin="Silk">
                    <ChartTitle Text="">
                    <Appearance Align="Center" Position="Top" Visible="false">
                        <TextStyle Bold="true" FontSize="14px" />
                    </Appearance>
                    </ChartTitle>
                    <Legend>
                        <Appearance BackgroundColor="Transparent" Position="Right" Visible="true"></Appearance>
                    </Legend>
                    <ClientEvents OnLoad="onChartLoad" />
                    <Pan Enabled="true" Lock="None" ModifierKey="None"/>
                    <Zoom Enabled="false">
                        <MouseWheel Enabled="true" />
                        <Selection Enabled="true" ModifierKey="Shift" />
                    </Zoom>
                    <PlotArea>
                        <Series/>
                        <Appearance>
                            <FillStyle BackgroundColor="Transparent"></FillStyle>
                        </Appearance>
                        <XAxis AxisCrossingValue="0" Color="black" MajorTickType="Outside" MinorTickType="Outside"
                                Reversed="false" >
                            <LabelsAppearance RotationAngle="0" Skip="0" Step="1" Mirror="false"  />
                            <TitleAppearance Position="Center" RotationAngle="0" Text="Years" Visible="false"></TitleAppearance>
                            <MinorGridLines Visible="false" />
                        </XAxis>
                        <YAxis AxisCrossingValue="0" Color="black" MajorTickSize="1" MajorTickType="Outside"
                            MinorTickType="None" Reversed="false">
                            <LabelsAppearance RotationAngle="90" Skip="0" Step="1"></LabelsAppearance>
                            <TitleAppearance Position="Center" RotationAngle="0" Text="Sum" Visible="true">
                                <TextStyle FontSize="14" />
                            </TitleAppearance>
                            <MinorGridLines Visible="false" />
                        </YAxis>
                    </PlotArea>
                    <Appearance>
                        <FillStyle BackgroundColor="Transparent"></FillStyle> 
                    </Appearance>                    
              </telerik:RadHtmlChart>

 

  chart.Pan.Enabled = True

            'ADD SERIES

            Dim series_atLeast1Category As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
            series_atLeast1Category.Name = "At Least 1 Category"
            series_atLeast1Category.LabelsAppearance.Visible = False
            series_atLeast1Category.TooltipsAppearance.Color = Color.White

            series_atLeast1Category.Gap = "4"
            series_atLeast1Category.Spacing = "0.2"

            Dim series_moreThan1Category As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
            series_moreThan1Category.Name = "More than 1 Category"
            series_moreThan1Category.LabelsAppearance.Visible = False
            series_moreThan1Category.LabelsAppearance.Position = HtmlChart.BarColumnLabelsPosition.InsideBase
            series_moreThan1Category.TooltipsAppearance.Color = Color.White

            Dim series_ElderPopulations As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
            series_ElderPopulations.Name = "Elder Populations"
            series_ElderPopulations.LabelsAppearance.Visible = False
            series_ElderPopulations.TooltipsAppearance.Color = Color.White

            Dim series_MinorityPopulations As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
            series_MinorityPopulations.Name = "Minority Populations"
            series_MinorityPopulations.LabelsAppearance.Visible = False
            series_MinorityPopulations.TooltipsAppearance.Color = Color.White

            Dim series_DisabilityStatus As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
            series_DisabilityStatus.Name = "Disability Status"
            series_DisabilityStatus.LabelsAppearance.Visible = False
            series_DisabilityStatus.TooltipsAppearance.Color = Color.White

            Dim series_LimitedEnglishProficiency As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
            series_LimitedEnglishProficiency.Name = "Limited English Proficiency"
            series_LimitedEnglishProficiency.LabelsAppearance.Visible = False
            series_LimitedEnglishProficiency.TooltipsAppearance.Color = Color.White

            Dim series_LowIncomePopulations As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
            series_LowIncomePopulations.Name = "Low-Income Populations"
            series_LowIncomePopulations.LabelsAppearance.Visible = False
            series_LowIncomePopulations.TooltipsAppearance.Color = Color.White

            Dim strFormat As String = "#=series.name# (" & "#= kendo.toString(value,\'\\#,\\#\\#\\#.\\#\\#\\#\\#\\#\') #" & ")"

            For Each dr As DataRow In dt.Rows

                series_atLeast1Category.SeriesItems.Add(Format(dr("EJ_SingleEmp"), "#,###,###,##0.##"))
                series_atLeast1Category.TooltipsAppearance.ClientTemplate = strFormat

                series_moreThan1Category.SeriesItems.Add(IIf(dr("EJ_MultiEmp") Is System.DBNull.Value, 0, dr("EJ_MultiEmp")))
                series_moreThan1Category.TooltipsAppearance.ClientTemplate = strFormat

                series_ElderPopulations.SeriesItems.Add(IIf(dr("EJ_ElderEmp") Is System.DBNull.Value, 0, dr("EJ_ElderEmp")))
                series_ElderPopulations.TooltipsAppearance.ClientTemplate = strFormat

                series_MinorityPopulations.SeriesItems.Add(IIf(dr("EJ_RaceEmp") Is System.DBNull.Value, 0, dr("EJ_RaceEmp")))
                series_MinorityPopulations.TooltipsAppearance.ClientTemplate = strFormat

                series_DisabilityStatus.SeriesItems.Add(IIf(dr("EJ_DiabEmp") Is System.DBNull.Value, 0, dr("EJ_DiabEmp")))
                series_DisabilityStatus.TooltipsAppearance.ClientTemplate = strFormat

                series_LimitedEnglishProficiency.SeriesItems.Add(IIf(dr("EJ_LepEmp") Is System.DBNull.Value, 0, dr("EJ_LepEmp")))
                series_LimitedEnglishProficiency.TooltipsAppearance.ClientTemplate = strFormat

                series_LowIncomePopulations.SeriesItems.Add(IIf(dr("EJ_IncEmp") Is System.DBNull.Value, 0, dr("EJ_IncEmp")))
                series_LowIncomePopulations.TooltipsAppearance.ClientTemplate = strFormat

                chart.PlotArea.XAxis.Items.Add(dr("DistrictName"))

            Next

            chart.PlotArea.YAxis.MajorGridLines.Visible = False
            chart.PlotArea.XAxis.MajorGridLines.Visible = False

            chart.PlotArea.Series.Add(series_atLeast1Category)
            chart.PlotArea.Series.Add(series_moreThan1Category)
            chart.PlotArea.Series.Add(series_ElderPopulations)
            chart.PlotArea.Series.Add(series_MinorityPopulations)
            chart.PlotArea.Series.Add(series_DisabilityStatus)
            chart.PlotArea.Series.Add(series_LimitedEnglishProficiency)
            chart.PlotArea.Series.Add(series_LowIncomePopulations)

            chart.DataBind()

Yana
Top achievements
Rank 1
Veteran
 asked on 22 Jun 2020
3 answers
149 views

What is the proper procedure to ajaxify controls contained in layout templates of RadGrids or Formviews?

e.g. if RadFormView1 contains an itemtemplate which contains a RadGrid, how does one properly configure the RadAjaxManager to ajaxify the grid?

I tried something like this:

01.<telerik:RadAjaxManager runat="server" ID="RadAjaxManager_ManualRequest">
02.    <AjaxSettings>
03.      <telerik:AjaxSetting AjaxControlID="RadFormView_Customers">
04.        <UpdatedControls>
05.          <telerik:AjaxUpdatedControl ControlID="RadFormView_Customers" LoadingPanelID="RadAjaxLoadingPanel_ManualRequest" />
06.        </UpdatedControls>
07.      </telerik:AjaxSetting>
08.      <telerik:AjaxSetting AjaxControlID="RadGrid_Addresses">
09.        <UpdatedControls>
10.          <telerik:AjaxUpdatedControl ControlID="RadGrid_Addresses" LoadingPanelID="RadAjaxLoadingPanel_ManualRequest" />
11.        </UpdatedControls>
12.      </telerik:AjaxSetting>
13.    </AjaxSettings>
14.  </telerik:RadAjaxManager>

 

Using this definition (where Radgrid_Addresses is a control contained in the ItemTemplate of the Formview), the ajax request seems to work for the first request to the radgrid (for example, moving to the next page) but subsequent requests (moving back or forward a page again) seem to affect the entire formview rather than just the grid.

 

Thanks,

 

Vessy
Telerik team
 answered on 19 Jun 2020
8 answers
500 views

Hi,

We are using a stacked column series for our chart display. We have a single stacked bar in display (as attached). I am trying to add a border to each stack/column but I couldn't find an attribute I can use. I tried the approach defined here but that didn't seem to work.

https://feedback.telerik.com/aspnet-ajax/1373488-add-appearance-options-for-the-series-border-in-radhtmlchart

Another thing that I am having to struggle with is I have the chart title visible set to false but there is a white space in that area that I can't seem to get rid of. Is there somewhere in css i can do that?

Attached is the expected and what I see right now. I gave the chart a black background to show what I mean.

Can you help me figure this out?

 

 

 

Vessy
Telerik team
 answered on 19 Jun 2020
2 answers
375 views
Hi,

I am using RadDatePicker and I want to make whole week selectable. When user click on any date then whole week row will be selected and input field will be filled with Monday's date. Also I can set default week by date.

Any idea?



Had
Top achievements
Rank 1
Iron
 answered on 19 Jun 2020
0 answers
184 views

Hello,
in this example: 

https://demos.telerik.com/aspnet-ajax/autocompletebox/examples/default/defaultvb.aspx?show-source=true

is missing the DefaultVB.aspx.designer.vb

so when I try to reproduce, I get these errors:

 

How can I solve?

Thank you.

Luis

Luis
Top achievements
Rank 1
Veteran
 asked on 18 Jun 2020
1 answer
154 views

hello

I want to open radgrid header context filte exact coumn header position but it goes to Top ..Please Help Me!!

Vessy
Telerik team
 answered on 18 Jun 2020
3 answers
493 views

I have implement a custom provider for RadSpreadsheet as follows:

 

public class MySpreadsheetDocumentProvider : SpreadsheetProviderBase
{
public string FilePath { get; set; }
 
      public MySpreadsheetDocumentProvider(APD apd, out string errorMessage) : base()
{
   errorMessage = string.Empty;
   string folderPath = $"{ConfigurationManager.AppSettings["SpreadsheetFolder"]}";
 
 if (!Directory.Exists(folderPath))
 {
   Directory.CreateDirectory(folderPath);
 }
              
  FilePath = $"{folderPath}/{apd.APDId}.xlsx";
 
  if (!File.Exists(FilePath))
  {               
     Workbook workbook = new Workbook();
     Worksheet worksheet = workbook.AddSheet();                
 
     using (APD_BLL apd_bll = new APD_BLL())
     {
        var apd_data = apd_bll.Get(apd.APDId);
        FillWorksheet(worksheet, apd_data);
     }
 
     workbook.Save(FilePath);
  }           
   }
 
public override void SaveWorkbook(Workbook workbook)
   {
   SpreadsheetDocumentProvider provider = new SpreadsheetDocumentProvider(FilePath);
   provider.SaveWorkbook(workbook);
   }
 
public override List<Worksheet> GetSheets()
   {
    SpreadsheetDocumentProvider provider = new SpreadsheetDocumentProvider(FilePath);
    var sheets = provider.GetSheets();
 
    return sheets;
 }
 
 private static void FillWorksheet(Worksheet sheet, IEnumerable<APDYpallhlou> data)
 

  .....

 }

 

So the provider looks for an excel file in a predefined location. If the file exists then it is bound to the RadSpreadsheet, otherwise a new file is created. This part of the provider works well with small as well as with bigger files.

The problem is when I try to Save the RadSpreadsheet by clicking the Save button on the toolbar. Save works ok for a few hundred rows. But it fails for a larger number of rows, e.g. 15000 rows. When the Save button is clicked the page freezes and method SaveWorkbook(Workbook workbook) is never invoked.

Peter Milchev
Telerik team
 answered on 18 Jun 2020
1 answer
169 views

Hi,
I am using the textbox, RadNumericTextBox and RadAutoCompleteBox inside the grid to receive the values and store them in the DB. However, when a lot of data needs to be input, the speed of binding becomes slower, so virtualization and paging are performed. So, there is a problem of turning the loop to get the data of the grid and not getting the entire data.

RadGridItems.AllowPaging = false; RadGridItems.Rebind(); I need to get the data entered in needdatasource at the time, but I don't know how to get it. Please tell me how to get all the data entered on the paged grid. Please help me its urgent issue.please refer code below.

<telerik:RadGrid ID="RadGridItems" runat="server" AllowMultiRowSelection="true" ShowFooter="true" RenderMode="Lightweight" 
                OnItemDataBound="RadGridItems_ItemDataBound" OnRowDrop="RadGridItems_RowDrop" AutoGenerateColumns="false" AllowAutomaticDeletes="true" 
                 OnPageIndexChanged="RadGridItems_PageIndexChanged" 
                ShowStatusBar="false" EnableEmbeddedSkins="true" EnableEmbeddedBaseStylesheet="true" CssClass="brd_list2" PagerStyle-CssClass="brd_pager2" Width="1920">
<MasterTableView EnableHeaderContextMenu="false" NoMasterRecordsText="" HeaderStyle-Wrap="false" ItemStyle-Wrap="false" AlternatingItemStyle-Wrap="false">
                    <ColumnGroups>
                        <telerik:GridColumnGroup HeaderText="예상매입처" Name="Buy"></telerik:GridColumnGroup>
                        <telerik:GridColumnGroup HeaderText="예상운반비" Name="Trans"></telerik:GridColumnGroup>
    </ColumnGroups>
<Columns>
<telerik:GridClientSelectColumn UniqueName="chkline" HeaderStyle-Width="30" ItemStyle-CssClass="col_ct"></telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn DataField="Sequence" HeaderText="번호" Visible="false" HeaderStyle-Width="40px" ItemStyle-CssClass="col_ct"></telerik:GridBoundColumn>

                        <telerik:GridTemplateColumn HeaderText="품목코드" HeaderStyle-Width="100" ItemStyle-CssClass="col_ct" >
<ItemTemplate>
                                <telerik:RadTextBox ID="ItemCode" runat="server" Enabled="false" Text='<%# DataBinder.Eval(Container.DataItem, "ItemCode")%>' Skin="Windows7"></telerik:RadTextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
    <telerik:GridBoundColumn DataField="ItemName" UniqueName="ItemName" Display="false" HeaderText="품목명"></telerik:GridBoundColumn> 
                                                      
<telerik:GridTemplateColumn HeaderText="수종" HeaderStyle-Width="140">
<ItemTemplate>
<telerik:RadAutoCompleteBox ID="TreeCode" runat="server" OnClientTextChanged="TreeCode_TextChanged" DropDownPosition="Automatic" DropDownWidth="250" DataSourceID="TreeSpecies" 
                                    DataValueField="ItemCode" DataTextField="TreeName" InputType="Text" Skin="Windows7" OnDataSourceSelect="TreeCode_DataSourceSelect">
<DropDownItemTemplate>
<table>
<tr>                                                 
<th><%# DataBinder.Eval(Container.DataItem, "TreeName")%></th>                                                                                               
                                                <th>,&nbsp;</th>
                                                <th><%# DataBinder.Eval(Container.DataItem, "Description")%></th>
</tr>
</table>
</DropDownItemTemplate>
<TextSettings SelectionMode="Single" />                                  
</telerik:RadAutoCompleteBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
                     
                        <telerik:GridTemplateColumn HeaderText="규격" HeaderStyle-Width="120" ItemStyle-CssClass="col_ct">
<ItemTemplate>
<telerik:RadTextBox ID="Description" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description")%>' Width="130" Skin="Windows7"></telerik:RadTextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>                                                         

<telerik:GridTemplateColumn UniqueName="Quantity" HeaderText="수량" HeaderStyle-Width="80" ItemStyle-CssClass="col_rg" FooterStyle-CssClass="col_rg">
<ItemTemplate>
<telerik:RadNumericTextBox ID="Quantity" EmptyMessage="0" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" DbValueFactor="1" LabelWidth="64px" Enabled="true"
DbValue='<%# Bind("Quantity") %>' MaxValue="7.0368744177664E+15" MinValue="-7.0368744177664E+15" Width="115px" Height="19px" DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
                                    <ClientEvents OnValueChanged="CalculateSupplyAmount" />
</telerik:RadNumericTextBox>
</ItemTemplate>
                            <FooterTemplate>
<telerik:RadNumericTextBox ID="SumQuantity" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" Width="100px" Height="19px" LabelWidth="64px"
DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
</telerik:RadNumericTextBox>
</FooterTemplate>
</telerik:GridTemplateColumn>                                                                     
                        <telerik:GridTemplateColumn UniqueName="UnitPrice" HeaderText="매출단가" HeaderStyle-Width="6%" ItemStyle-CssClass="col_rg align_txt_src" FooterStyle-CssClass="col_rg">
<ItemTemplate>
                               
                                <telerik:RadNumericTextBox ID="UnitPrice" EmptyMessage="0" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" DbValueFactor="1" LabelWidth="24px" Enabled="true"
    DbValue='<%# Bind("UnitPrice") %>' MaxValue="7.0368744177664E+15" MinValue="-7.0368744177664E+15" Height="19px" DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
    <NegativeStyle Resize="None"></NegativeStyle>
    <NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
    <EmptyMessageStyle Resize="None"></EmptyMessageStyle>
    <ReadOnlyStyle Resize="None"></ReadOnlyStyle>
    <FocusedStyle Resize="None"></FocusedStyle>
    <DisabledStyle Resize="None"></DisabledStyle>
    <InvalidStyle Resize="None"></InvalidStyle>
    <HoveredStyle Resize="None"></HoveredStyle>
    <EnabledStyle Resize="None"></EnabledStyle>
                                    <ClientEvents OnValueChanged="CalculateSupplyAmount" />
    </telerik:RadNumericTextBox> 
                                <telerik:RadButton ID="btnUnitPrice" AutoPostBack="true" OnClick="btnUnitPrice_Click" runat="server" Text="Search" Skin="" CssClass="btn_src"></telerik:RadButton>
                                                                                                                                                  
    </ItemTemplate>
</telerik:GridTemplateColumn>

                        <telerik:GridTemplateColumn UniqueName="UnitPriceButton" Display="false" HeaderStyle-Width="50">
<ItemTemplate>
                                <span class="telerik_bx inp_btn">
                                    <telerik:RadButton ID="btnUnitPrice2" AutoPostBack="true" OnClick="btnUnitPrice_Click" runat="server" Text="Search" Skin="" CssClass="btn_src"></telerik:RadButton>
                                </span>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>

<telerik:GridTemplateColumn UniqueName="SupplyAmount" HeaderText="매출액" HeaderStyle-Width="110" ItemStyle-CssClass="col_rg" FooterStyle-CssClass="col_rg">
<ItemTemplate>
<telerik:RadNumericTextBox ID="SupplyAmount" EmptyMessage="0" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" DbValueFactor="1" LabelWidth="64px" 
DbValue='<%# Bind("SupplyAmount") %>' MaxValue="7.0368744177664E+15" MinValue="-7.0368744177664E+15" Width="115px" Height="19px" DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
</telerik:RadNumericTextBox>
</ItemTemplate>
<FooterTemplate>
<telerik:RadNumericTextBox ID="SumSupplyAmount" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" Width="120" Height="19px" LabelWidth="64px"
DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
</telerik:RadNumericTextBox>
</FooterTemplate>
</telerik:GridTemplateColumn>
                       
                        <telerik:GridTemplateColumn HeaderText="코드" ColumnGroupName="Buy" HeaderStyle-Width="60px" ItemStyle-CssClass="col_ct" >
<ItemTemplate>
                                <telerik:RadTextBox ID="VendorCode" runat="server" ClientEvents-OnValueChanged="VendorCode_TextChanged" Text='<%# DataBinder.Eval(Container.DataItem, "VendorCode")%>' Skin="Windows7"></telerik:RadTextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
                        
<telerik:GridTemplateColumn HeaderText="명칭" ColumnGroupName="Buy"  HeaderStyle-Width="190px" ItemStyle-CssClass="col_lf" >
<ItemTemplate>
<telerik:RadAutoCompleteBox ID="VendorName" runat="server" OnClientTextChanged="VendorName_TextChanged" DataSourceID="Vendor" DataTextField="VendorName" DataValueField="VendorCode" InputType="Text" Skin="Windows7" OnDataSourceSelect="VendorName_DataSourceSelect">
<DropDownItemTemplate>
<table>
<tr>
<th><%# DataBinder.Eval(Container.DataItem, "VendorCode")%></th>
<th><%# DataBinder.Eval(Container.DataItem, "VendorName")%></th>
</tr>
</table>
</DropDownItemTemplate>
<TextSettings SelectionMode="Single" />
</telerik:RadAutoCompleteBox>
</ItemTemplate>
</telerik:GridTemplateColumn>                   
                        <telerik:GridBoundColumn DataField="VendorCode" UniqueName="DisVendorCode" Display="false"></telerik:GridBoundColumn>
                        
                        <telerik:GridTemplateColumn HeaderText="매입단가" HeaderStyle-Width="6%" ItemStyle-CssClass="col_rg align_txt_src" FooterStyle-CssClass="col_rg">
<ItemTemplate>       
                                                   
    <telerik:RadNumericTextBox ID="UnitCost2" EmptyMessage="0" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" DbValueFactor="1" LabelWidth="64px" Enabled="true"
    DbValue='<%# Bind("UnitCost") %>' MaxValue="7.0368744177664E+15" MinValue="-7.0368744177664E+15" Height="19px" DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
    <NegativeStyle Resize="None"></NegativeStyle>
    <NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
    <EmptyMessageStyle Resize="None"></EmptyMessageStyle>
    <ReadOnlyStyle Resize="None"></ReadOnlyStyle>
    <FocusedStyle Resize="None"></FocusedStyle>
    <DisabledStyle Resize="None"></DisabledStyle>
    <InvalidStyle Resize="None"></InvalidStyle>
    <HoveredStyle Resize="None"></HoveredStyle>
    <EnabledStyle Resize="None"></EnabledStyle>
                                    <ClientEvents OnValueChanged="CalculateCost" />
    </telerik:RadNumericTextBox>
                                
                                <telerik:RadButton ID="btnUnitCost" AutoPostBack="true" OnClick="btnUnitCost_Click" runat="server" Text="Search" Skin="" CssClass="btn_src"></telerik:RadButton>
                                                        
    </ItemTemplate>
</telerik:GridTemplateColumn>
                     
<telerik:GridTemplateColumn HeaderText="매입액" HeaderStyle-Width="110" ItemStyle-CssClass="col_rg" FooterStyle-CssClass="col_rg">
<ItemTemplate>
<telerik:RadNumericTextBox ID="CostAmount" EmptyMessage="0" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" DbValueFactor="1" LabelWidth="64px" Enabled="true"
DbValue='<%# Bind("Cost") %>' MaxValue="7.0368744177664E+15" MinValue="-7.0368744177664E+15" Width="115px" Height="19px" DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
</telerik:RadNumericTextBox>
</ItemTemplate>
<FooterTemplate>
<telerik:RadNumericTextBox ID="SumCost" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" Width="120" Height="19px" LabelWidth="64px" Enabled="true"
DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
</telerik:RadNumericTextBox>
</FooterTemplate>
</telerik:GridTemplateColumn>

                        <telerik:GridBoundColumn DataField="FromLocationCode" UniqueName="DisFromLocationCode" Display="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ToLocationCode" UniqueName="DisToLocationCode" Display="false"></telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="출도착" ColumnGroupName="Trans" HeaderStyle-Width="270" ItemStyle-CssClass="col_ct align_txt_src">
<ItemTemplate>
                                <telerik:RadAutoCompleteBox ID="FromLocation" runat="server" DataSourceID="FromLocationCode" DataTextField="FromLocationName" DataValueField="FromLocationCode" InputType="Text" Skin="Windows7" OnDataSourceSelect="FromLocation_DataSourceSelect">
<DropDownItemTemplate>
<table>
<tr>
<th><%# DataBinder.Eval(Container.DataItem, "FromLocationCode")%></th>
<th><%# DataBinder.Eval(Container.DataItem, "FromLocationName")%></th>
</tr>
</table>
</DropDownItemTemplate>
<TextSettings SelectionMode="Single" />
</telerik:RadAutoCompleteBox>
                                <telerik:RadAutoCompleteBox ID="ToLocation" runat="server" DataSourceID="ToLocationCode" DataTextField="ToLocationName" DataValueField="ToLocationCode" InputType="Text" Skin="Windows7" OnDataSourceSelect="ToLocation_DataSourceSelect">
<DropDownItemTemplate>
<table>
<tr>
<th><%# DataBinder.Eval(Container.DataItem, "ToLocationCode")%></th>
<th><%# DataBinder.Eval(Container.DataItem, "ToLocationName")%></th>
</tr>
</table>
</DropDownItemTemplate>
<TextSettings SelectionMode="Single" />
</telerik:RadAutoCompleteBox>
                                
                                <telerik:RadButton ID="btnTransPort" AutoPostBack="true" OnClick="btnTransPort_Click" runat="server" Text="Search" Skin="" CssClass="btn_src"></telerik:RadButton>
                                                 
</ItemTemplate>       
</telerik:GridTemplateColumn>
                       
                        <telerik:GridTemplateColumn HeaderText="금액" ColumnGroupName="Trans" HeaderStyle-Width="90" ItemStyle-CssClass="col_rg" FooterStyle-CssClass="col_rg">
<ItemTemplate>
<telerik:RadNumericTextBox ID="DeliveryCost" Runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" DbValueFactor="1" LabelWidth="64px" 
DbValue='<%# Bind("DeliveryCost") %>' MaxValue="7.0368744177664E+15" MinValue="-7.0368744177664E+15" Width="120px" Height="19px" DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="NotSet" FocusedStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
                                    <ClientEvents OnValueChanged="CalculateSumDeliveryCost" />
</telerik:RadNumericTextBox>
</ItemTemplate>
<FooterTemplate>
<telerik:RadNumericTextBox ID="SumDeliveryCost" runat="server" IncrementSettings-InterceptArrowKeys="false" IncrementSettings-InterceptMouseWheel="false" Culture="ko-KR" Width="80" Height="19px" LabelWidth="64px"
DisabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Right" InvalidStyle-HorizontalAlign="Right" NegativeStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
<NegativeStyle Resize="None"></NegativeStyle>
<NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
<FocusedStyle Resize="None"></FocusedStyle>
<DisabledStyle Resize="None"></DisabledStyle>
<InvalidStyle Resize="None"></InvalidStyle>
<HoveredStyle Resize="None"></HoveredStyle>
<EnabledStyle Resize="None"></EnabledStyle>
</telerik:RadNumericTextBox>
</FooterTemplate>
</telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="인도조건" ColumnGroupName="Trans" Visible="false" HeaderStyle-Width="80" ItemStyle-CssClass="col_ct">
<ItemTemplate>
<telerik:RadComboBox ID="TermsCode" runat="server" Skin="" Width="100%" DataSourceID="TermsOfDelivery"  
                                     SelectedValue='<%# DataBinder.Eval(Container.DataItem, "TermsCode") %>' DataTextField="TermsName" DataValueField="TermsCode"></telerik:RadComboBox>
</ItemTemplate>       
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="비고" HeaderStyle-Width="130" ItemStyle-CssClass="col_ct">
<ItemTemplate>
<telerik:RadTextBox ID="Memo1" AutoCompleteType="BusinessCity" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Memo1")%>' Width="150" Skin="Windows7"></telerik:RadTextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>                            
</Columns>
</MasterTableView>
<ClientSettings AllowRowsDragDrop="true" EnablePostBackOnRowClick="false">
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="false" ScrollHeight="350px" />
<Selecting AllowRowSelect="True" EnableDragToSelectRows="false"/>
                    <Virtualization EnableVirtualization="true" RetrievedItemsPerRequest="20" InitiallyCachedItemsCount="20" ItemsPerView="20"
                    LoadingPanelID="RadAjaxLoadingPanel1"  EnableCurrentPageScrollOnly="false"/>
</ClientSettings>
</telerik:RadGrid>

RadGridItems.AllowPaging = false;
        RadGridItems.Rebind();
    
        foreach (GridDataItem dataItem in RadGridItems.Items)
        {
            DataRow workRow = dtable.NewRow();

            if (!string.IsNullOrEmpty((dataItem.FindControl("TreeCode") as RadAutoCompleteBox).Text)) 
            {
                workRow["Sequence"] = dataItem.ItemIndex;

                string treeName = (dataItem.FindControl("TreeCode") as RadAutoCompleteBox).Entries[0].Text.Trim();
                string itemCode = (dataItem.FindControl("ItemCode") as RadTextBox).Text.Trim();

                if (!string.IsNullOrEmpty(itemCode))
                {
                    workRow["ItemCode"] = itemCode;
                    workRow["TreeCode"] = utility.getTreeCodeByItemCode(itemCode);
                }
                else
                {
                    workRow["ItemCode"] = string.Empty;
                    workRow["TreeCode"] = string.Empty;
                }

                workRow["TreeName"] = treeName;
                workRow["ItemName"] = treeName;
                               
                workRow["Description"] = (dataItem.FindControl("Description") as RadTextBox).Text;
                workRow["Quantity"] = entry.ConvertStringToDecimal((dataItem.FindControl("Quantity") as RadNumericTextBox).Text.ToString());
                workRow["UnitPrice"] = entry.ConvertStringToDecimal((dataItem.FindControl("UnitPrice") as RadNumericTextBox).Text.ToString());
                workRow["SupplyAmount"] = entry.ConvertStringToDecimal((dataItem.FindControl("SupplyAmount") as RadNumericTextBox).Text.ToString());

                if (!string.IsNullOrEmpty((dataItem.FindControl("VendorName") as RadAutoCompleteBox).Text))
                {
                    workRow["VendorCode"] = (dataItem.FindControl("VendorName") as RadAutoCompleteBox).Entries[0].Value;
                    workRow["VendorName"] = (dataItem.FindControl("VendorName") as RadAutoCompleteBox).Entries[0].Text;
                }
                else
                {
                    workRow["VendorCode"] = string.Empty;
                    workRow["VendorName"] = string.Empty;
                }

                workRow["UnitCost"] = entry.ConvertStringToDecimal((dataItem.FindControl("UnitCost2") as RadNumericTextBox).Text.ToString());
                workRow["Cost"] = entry.ConvertStringToDecimal((dataItem.FindControl("CostAmount") as RadNumericTextBox).Text.ToString());

                if (!string.IsNullOrEmpty((dataItem.FindControl("FromLocation") as RadAutoCompleteBox).Text))
                {
                    workRow["FromLocationCode"] = (dataItem.FindControl("FromLocation") as RadAutoCompleteBox).Entries[0].Value;
                    workRow["FromLocationName"] = (dataItem.FindControl("FromLocation") as RadAutoCompleteBox).Entries[0].Text;
                }
                else
                {
                    workRow["FromLocationCode"] = string.Empty;
                    workRow["FromLocationName"] = string.Empty;    
                }
                if (!string.IsNullOrEmpty((dataItem.FindControl("ToLocation") as RadAutoCompleteBox).Text))
                {
                    workRow["ToLocationCode"] = (dataItem.FindControl("ToLocation") as RadAutoCompleteBox).Entries[0].Value;
                    workRow["ToLocationName"] = (dataItem.FindControl("ToLocation") as RadAutoCompleteBox).Entries[0].Text;
                }
                else
                {
                    workRow["ToLocationCode"] = string.Empty;
                    workRow["ToLocationName"] = string.Empty;    
                }

                workRow["DeliveryCost"] = entry.ConvertStringToDecimal((dataItem.FindControl("DeliveryCost") as RadNumericTextBox).Text.ToString());
                workRow["TermsCode"] = (dataItem.FindControl("TermsCode") as RadComboBox).SelectedValue;
                workRow["Memo1"] = (dataItem.FindControl("Memo1") as RadTextBox).Text;

                dtable.Rows.Add(workRow);
                dtable.AcceptChanges();
            }
        }

protected void RadGridItems_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        //RadGridItems.DataSource = (DataTable)Session["Proposal_DT"];
        //RadGridItems.CurrentPageIndex = RadGridItems.MasterTableView.CurrentPageIndex;
    }


Attila Antal
Telerik team
 answered on 18 Jun 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?