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

Hi all,

How can the footer sum of each group can be displayed in the header of each group .

 

Thanks,

Sanjay

Vessy
Telerik team
 answered on 09 Jan 2019
2 answers
548 views
I've encountered an unusual issue in the last few days, we have an intranet web application and certain users are having issues with. After scratching my head and just being stumped I went into the console on their computers to see what exactly was going on and this is what I got on the 3 users that are having issues.

I am stumped, anyone have any idea? This is happening on 3 users computers out of 60+ and it's local to their computer. Is it related to that something is cached?

Here's what I got:

HTML1113: Document mode restart from Quirks to IE9 Standards
Market.aspx
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.ScrollerOrientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=b9KsUdSZQDQ-7k6YdDj73dD2q66QSEeqNPOmZv7RV7ObaEgPhvf-ptG97NjWTEcAItqvIyWhjnwB0MDVvMHrl1JVjWspARgnBCLigALttPeoQhPzK5TclXTpEUqK3YsFRRVZP_XpEeVDafkw8oO498ePJqFHh4_JRQkcPUM-tHwoEplwFwprxeg7pl75PdCv0&t=ffffffff940d030f, line 1647 character 38
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.AttributeCollection has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=b9KsUdSZQDQ-7k6YdDj73dD2q66QSEeqNPOmZv7RV7ObaEgPhvf-ptG97NjWTEcAItqvIyWhjnwB0MDVvMHrl1JVjWspARgnBCLigALttPeoQhPzK5TclXTpEUqK3YsFRRVZP_XpEeVDafkw8oO498ePJqFHh4_JRQkcPUM-tHwoEplwFwprxeg7pl75PdCv0&t=ffffffff940d030f, line 785 character 42
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.RadTab has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=b9KsUdSZQDQ-7k6YdDj73dD2q66QSEeqNPOmZv7RV7ObaEgPhvf-ptG97NjWTEcAItqvIyWhjnwB0MDVvMHrl1JVjWspARgnBCLigALttPeoQhPzK5TclXTpEUqK3YsFRRVZP_XpEeVDafkw8oO498ePJqFHh4_JRQkcPUM-tHwoEplwFwprxeg7pl75PdCv0&t=ffffffff940d030f, line 785 character 42
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.TouchScrollExtender has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=b9KsUdSZQDQ-7k6YdDj73dD2q66QSEeqNPOmZv7RV7ObaEgPhvf-ptG97NjWTEcAItqvIyWhjnwB0MDVvMHrl1JVjWspARgnBCLigALttPeoQhPzK5TclXTpEUqK3YsFRRVZP_XpEeVDafkw8oO498ePJqFHh4_JRQkcPUM-tHwoEplwFwprxeg7pl75PdCv0&t=ffffffff940d030f, line 785 character 42
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.NavigationControlODataSettings has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=b9KsUdSZQDQ-7k6YdDj73dD2q66QSEeqNPOmZv7RV7ObaEgPhvf-ptG97NjWTEcAItqvIyWhjnwB0MDVvMHrl1JVjWspARgnBCLigALttPeoQhPzK5TclXTpEUqK3YsFRRVZP_XpEeVDafkw8oO498ePJqFHh4_JRQkcPUM-tHwoEplwFwprxeg7pl75PdCv0&t=ffffffff940d030f, line 785 character 42
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.RadComboBoxItem has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=b9KsUdSZQDQ-7k6YdDj73dD2q66QSEeqNPOmZv7RV7ObaEgPhvf-ptG97NjWTEcAItqvIyWhjnwB0MDVvMHrl1JVjWspARgnBCLigALttPeoQhPzK5TclXTpEUqK3YsFRRVZP_XpEeVDafkw8oO498ePJqFHh4_JRQkcPUM-tHwoEplwFwprxeg7pl75PdCv0&t=ffffffff940d030f, line 785 character 42
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.GridColumn has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=b9KsUdSZQDQ-7k6YdDj73dD2q66QSEeqNPOmZv7RV7ObaEgPhvf-ptG97NjWTEcAItqvIyWhjnwB0MDVvMHrl1JVjWspARgnBCLigALttPeoQhPzK5TclXTpEUqK3YsFRRVZP_XpEeVDafkw8oO498ePJqFHh4_JRQkcPUM-tHwoEplwFwprxeg7pl75PdCv0&t=ffffffff940d030f, line 785 character 42
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 09 Jan 2019
5 answers
146 views

Hi,

we're trying to build an org chart, but we're getting the "Unable to activate this constraint. Not all values have corresponding parent values." error.

This is the code:

  • aspx:
  • <%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="Prova.aspx.cs" Inherits="TelerikOrgChart.Prova" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
     
    <html>
        <head>
            <meta name="viewport" content="width=device-width" />
            <title>Prova</title>
        </head>
        <body>
            <form id="form1" runat="server">
                <telerik:RadScriptManager runat="server" ID="RadScriptManager1"></telerik:RadScriptManager>
                <telerik:RadOrgChart ID="RadOrgChart1" runat="server" Skin="Windows7" GroupColumnCount="1"></telerik:RadOrgChart>
                 
            </form>
        </body>
    </html>
  • aspx.cs:
  • using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Data.Entity;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using OrgChartSice.Data;
     
    namespace TelerikOrgChart
    {
        public partial class Prova : System.Web.UI.Page
        {
            private DataTable teams;
            private DataTable employees;
            protected void Page_Load(object sender, EventArgs e)
            {
                OrgChartSiceDbContext orgChartSiceDbContext = new OrgChartSiceDbContext();
     
                var data = orgChartSiceDbContext.dbvw_HRZU_Organigramma_Azienda_Teste.ToList();
                var teamList = data
                    .Select(c => new { c.IDBOX, c.IDBOXFATHER, c.DSBOX })
                    .Distinct().ToList();
     
                var employeeList = data
                    .Select(c => new { c.IDSUBJECT, c.IDBOX, c.NOMINATIVO })
                    .Distinct().ToList();
     
                CreateTeams(teamList);
     
                CreateEmployees(employeeList);
     
                RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "TeamID";
                RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "ReportsTo";
                RadOrgChart1.RenderedFields.NodeFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "Team" });
                RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = teams;
     
                RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "EmployeeID";
                RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "TeamID";
                RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataTextField = "Name";
     
                RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataSource = employees;
                 
                RadOrgChart1.DataBind();
                 
            }
     
            private void CreateEmployees(IEnumerable<dynamic> data)
            {
                employees = new DataTable();
                employees.Columns.Add("EmployeeID");
                employees.Columns.Add("TeamID");
                employees.Columns.Add("Name");
                //employees.Columns.Add("ImageUrl");
                foreach (var item in data)
                    employees.Rows.Add(new string[] { item.IDSUBJECT, item.IDBOX, item.NOMINATIVO });
            }
     
            private void CreateTeams(IEnumerable<dynamic> data)
            {
                teams = new DataTable();
                teams.Columns.Add("TeamID");
                teams.Columns.Add("ReportsTo");
                teams.Columns["ReportsTo"].AllowDBNull = true;
                teams.Columns.Add("Team");
                foreach (var item in data)
                    teams.Rows.Add(new string[] { item.IDBOX, item.IDBOXFATHER == item.IDBOX ? null : item.IDBOXFATHER, item.DSBOX });
            }
        }
    }
  • teams table:
  • Team ID Reports To Team
    0000000520 NULL Consiglio di Amministrazione
    0000000521 0000000520 Amministrazione
    0000000522 0000000521 Contabilità
    0000000523 0000000521 Risorse Umane
    0000000524 0000000521 Legale
    0000000525 0000000522 Ciclo Attivo
    0000000526 0000000522 Ciclo Passivo
    0000000527 0000000522 Tesoreria
    0000000530 0000000521 Ufficio IT
    0000000541 0000000522 Fiscale
    0000000542 0000000523 Rilevazione Presenze
    0000000543 0000000523 Gestione Appalti
    0000000544 0000000521 Controllo Gestione
    0000000546 0000000520 Commerciale
    0000000547 0000000546 Gestione Acquisti
    0000000554 0000000544 Controllo Produzione e Commesse
    0000000558 0000000544 Programmazione Commesse
    0000000561 0000000523 Paghe e Contributi
    0000000562 0000000547 Viaggi
    0000000563 0000000546 Preventivi
    0000000564 0000000547 Acquisti Commerciali
    0000000566 0000000547 Acquisti Magazzino e Accettazione Merci e Attrezzature
    0000000571 0000000580 Magazzino Merci
    0000000572 0000000571 Ricezione Merci
    0000000573 0000000580 Magazzino Attrezzature
    0000000574 0000000571 Imballaggio
    0000000575 0000000571 Magazzino Costruzioni
    0000000576 0000000571 Magazzino Ferramenta
    0000000577 0000000546 Logistica
    0000000578 0000000577 Trasporti
    0000000579 0000000578 Trasporti Esterni
    0000000580 0000000577 Magazzino
    0000000581 0000000578 Trasporti Interni
    0000000582 0000000578 Trasporti e Magazzino Francia
    0000000583 0000000563 Preventivi Arredi
    0000000584 0000000563 Preventivi Costruzioni
    0000000585 0000000520 Tecnica
    0000000586 0000000585 Gestione Commesse
    0000000587 0000000586 PM Commesse Arredi
    0000000588 0000000586 PM Commesse Costruzioni
    0000000589 0000000586 Manutenzioni Commesse
    0000000590 0000000585 Cantieri
    0000000591 0000000590 Cantieri Costruzioni
    0000000592 0000000591 Gestione Cantieri Costruzioni
    0000000593 0000000592 Coordinamento Cantiere
    0000000594 0000000592 Contabilità
    0000000595 0000000591 Produzione Cantiere Costruzioni
    0000000596 0000000595 Carpenteria Edile
    0000000597 0000000595 Cartongessi
    0000000598 0000000595 Gessi
    0000000599 0000000595 Imbiancatura
    0000000600 0000000595 Muratura
    0000000601 0000000585 Produzione
    0000000605 0000000601 Produzione Arredi
    0000000606 0000000605 Produzione Carpenteria Leggera
    0000000607 0000000605 Produzione Acciai
    0000000608 0000000605 Produzione Falegnameria
    0000000609 0000000605 Produzione Finiture
    0000000610 0000000609 Decorazioni
    0000000611 0000000609 Verniciatura
    0000000612 0000000605 Produzione Marmi e Vetro
    0000000613 0000000605 Progettazione Prd Arredi
    0000000614 0000000613 Gestione Commesse di Produzione
    0000000615 0000000613 Progettazione di Produzione ACL
    0000000616 0000000613 Progettazione di Produzione LG
    0000000617 0000000601 Produzione Costruzioni
    0000000618 0000000617 Produzione Carpenteria Pesante
    0000000619 0000000585 Progettazione
    0000000620 0000000619 Progettazione Arredi
    0000000621 0000000620 Progettazione Carpenteria Leggera
    0000000622 0000000620 Progettazione Legno Acciaio
    0000000623 0000000619 Progettazione Costruzioni
    0000000624 0000000623 Progettazione Carpenteria Pesante
    0000000625 0000000623 Progettazione Edile
    0000000626 0000000520 Servizi Generali
    0000000627 0000000626 Servizi
    0000000628 0000000627 Centralino
    0000000629 0000000627 Manutenzione Immobili Impianti e Attrezzature
    0000000630 0000000629 Pulizie
    0000000631 0000000627 Ristorante Dopolavoro
    0000000632 0000000626 Sicurezza
    0000000633 0000000632 Sicurezza Cantieri e Stabilimento
    0000000635 0000000632 Formazione
    0000000636 0000000632 Ambiente
    0000000637 0000000595 Montaggi Carpenteria
    0000000638 0000000629 Gestione Impianti e Attrezzature
    0000000640 0000000588 Gestione Personale Cantieri Costruzione
    0000000641 0000000581 Trasporti Costruzioni
    0000000642 0000000581 Trasporti Arredi
    0000000644 0000000590 Cantieri Arredi
    0000000646 0000000645 Coordinamento Montaggio Arredi
    0000000647 0000000645 Montaggi Arredi
    0000000648 0000000627 Immagine e Comunicazione

This is the stack error:

System.Data.ConstraintCollection.AddForeignKeyConstraint(ForeignKeyConstraint constraint) +2097678
   System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign) +371
   System.Data.DataSetRelationCollection.AddCore(DataRelation relation) +929
   System.Data.DataRelationCollection.Add(DataRelation relation) +159
   System.Data.DataRelationCollection.Add(DataColumn parentColumn, DataColumn childColumn) +45
   Telerik.Web.UI.ControlDataBinder.BindToDataTable(DataTable table, String dataFieldID, String dataFieldParentID) +104
   Telerik.Web.UI.OrgChartNodeBinder.PerformDataBinding(IEnumerable data) +242
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +34
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   Telerik.Web.UI.OrgChartNodeBinder.SimpleBindingProcedure() +13
   Telerik.Web.UI.OrgChartNodeBinder.GroupEnabledBindingProcedure() +168
   Telerik.Web.UI.OrgChartNodeBinder.DataBind() +64
   Telerik.Web.UI.RadOrgChart.DataBind() +95
   TelerikOrgChart.Prova.Page_Load(Object sender, EventArgs e) in C:\MEGA\Projects\OrgChartSice\TelerikOrgChart\Prova.aspx.cs:55
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678
Marin Bratanov
Telerik team
 answered on 08 Jan 2019
12 answers
1.0K+ views
I've been seeing this for a while in my JavaScript log (developer tools and such), and it has no adverse effect.  In fact, I did a search online and I don't think this is a problem other than something that should be addressed in time as appropriate.

Are you aware of this, and is this something that will be addressed?
Rumen
Telerik team
 answered on 08 Jan 2019
1 answer
129 views

Hi,

We are using Telerik UI for ASP.NET AJAX in one of our Asp.net Application, we have a requirement to have a Tree View control with filter option.

Could you please help us if we have TreeView / Filter TreeView in dialog similar to https://demos.telerik.com/kendo-ui/treeview/filter-treeview-in-dialog in Telerik UI for ASP.NET AJAX.

 

Rumen
Telerik team
 answered on 04 Jan 2019
5 answers
434 views

Hi All,
This is Kunal from Bangalore.
I am facing an issue to focus on the first page while reloading the grid.
For Ex. I go to the 3rd page of the grid and re-populate the grid.The new grid displayed is still focussed on the 3rd page.
Is there any way I can get the focus back on the 1st page.
Please send in suitable pointers.

Regards,
Kunal

Attila Antal
Telerik team
 answered on 04 Jan 2019
1 answer
347 views

I made a Grid entirely in CodeBehind, I used the personalizated Template to edit or insert new values.

 

RadGrid gridTemplate = new RadGrid();
DataSet dsTemplate = new DataSet();
dsTemplate = ReglasNotificacion.GetTemplates(Convert.ToInt32(dt.Rows[i]["rule_order"].ToString()));
 
gridTemplate.ID = "Grid_" + dt.Rows[i]["rule_order"].ToString();
gridTemplate.Attributes.Add("IDRegla", dt.Rows[i]["rule_order"].ToString());
gridTemplate.AllowPaging = true;
gridTemplate.PageSize = 10;
gridTemplate.AllowSorting = true;
gridTemplate.ShowStatusBar = true;
gridTemplate.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
gridTemplate.RenderMode = RenderMode.Auto;
gridTemplate.Skin = "Bootstrap";
gridTemplate.MasterTableView.AutoGenerateColumns = false;
gridTemplate.MasterTableView.DataKeyNames = new string[] { "Cod_Notification", "Cod_Site", "Cod_Template" };
gridTemplate.MasterTableView.CommandItemSettings.AddNewRecordText = "Añadir nuevo registro.";
gridTemplate.MasterTableView.CommandItemSettings.ShowRefreshButton = false;
gridTemplate.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
gridTemplate.MasterTableView.EditMode = GridEditMode.EditForms;
gridTemplate.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.Template;
gridTemplate.MasterTableView.EditFormSettings.FormTemplate = new MyEditFormTemplate();
gridTemplate.MasterTableView.AllowAutomaticUpdates = false;
gridTemplate.MasterTableView.AllowAutomaticDeletes = false;
gridTemplate.MasterTableView.AllowAutomaticInserts = false;
 
gridTemplate.ItemCommand += new GridCommandEventHandler(gridTemplate_ItemCommand);
 
GridEditCommandColumn edit = new GridEditCommandColumn();
edit.UniqueName = "EditCommandColumn";
gridTemplate.MasterTableView.Columns.Add(edit);
 
GridBoundColumn boundColumn;
 
boundColumn = new GridBoundColumn();
boundColumn.DataField = "Cod_Notification";
boundColumn.HeaderText = "Rule";
boundColumn.SortExpression = "Cod_Notification";
boundColumn.UniqueName = "Cod_Notification";
boundColumn.Visible = false;
gridTemplate.MasterTableView.Columns.Add(boundColumn);
 
boundColumn = new GridBoundColumn();
boundColumn.DataField = "Cod_Site";
boundColumn.HeaderText = "Site";
boundColumn.SortExpression = "Cod_Site";
boundColumn.UniqueName = "Cod_Site";
boundColumn.Visible = false;
gridTemplate.MasterTableView.Columns.Add(boundColumn);
 
boundColumn = new GridBoundColumn();
boundColumn.DataField = "Txt_Site";
boundColumn.HeaderText = "Site";
boundColumn.SortExpression = "Txt_Site";
boundColumn.UniqueName = "Txt_Site";
boundColumn.Visible = true;
boundColumn.ItemStyle.Width = new Unit(10, UnitType.Percentage);
gridTemplate.MasterTableView.Columns.Add(boundColumn);
 
boundColumn = new GridBoundColumn();
boundColumn.DataField = "Txt_Template";
boundColumn.HeaderText = "Template";
boundColumn.SortExpression = "Txt_Template";
boundColumn.UniqueName = "Txt_Template";
boundColumn.Visible = true;
boundColumn.ItemStyle.Width = new Unit(40, UnitType.Percentage);
gridTemplate.MasterTableView.Columns.Add(boundColumn);
 
boundColumn = new GridBoundColumn();
boundColumn.DataField = "Subject";
boundColumn.HeaderText = "Subject";
boundColumn.SortExpression = "Subject";
boundColumn.UniqueName = "Subject";
boundColumn.Visible = true;
boundColumn.ItemStyle.Width = new Unit(40, UnitType.Percentage);
gridTemplate.MasterTableView.Columns.Add(boundColumn);
 
boundColumn = new GridBoundColumn();
boundColumn.DataField = "Cod_Active";
boundColumn.HeaderText = "Active";
boundColumn.SortExpression = "Cod_Active";
boundColumn.UniqueName = "Cod_Active";
boundColumn.Visible = true;
boundColumn.ItemStyle.Width = new Unit(10, UnitType.Percentage);
gridTemplate.MasterTableView.Columns.Add(boundColumn);
 
GridButtonColumn gBtnColumn = new GridButtonColumn();
gBtnColumn.CommandName = "Delete";
gBtnColumn.Text = "Delete";
gBtnColumn.ButtonType = GridButtonColumnType.ImageButton;
gridTemplate.MasterTableView.Columns.Add(gBtnColumn);
 
gridTemplate.DataSource = dsTemplate;

 

I made the class to use to with the TemplateForm.

 

public class MyEditFormTemplate : IBindableTemplate
{
    public void InstantiateIn(Control container)
    {
        GridEditFormItem item = ((GridEditFormItem)(container.NamingContainer));
        //tb1.Text = item.ParentItem.OwnerTableView.DataKeyValues[((GridDataItem)(item.ParentItem)).ItemIndex]["ProviderName"].ToString();
 
        HtmlTable tableLine = new HtmlTable();
        tableLine.ID = "Table_Template";
        tableLine.Width = "100%";
        tableLine.Align = "center";
      
        HtmlTableRow rowTemplate = new HtmlTableRow();
 
        HtmlTableCell cellTemplate = new HtmlTableCell();
        HtmlTableCell cellTemplateSite = new HtmlTableCell();
        HtmlTableCell cellTemplateTemplate = new HtmlTableCell();
        HtmlTableCell cellTemplateSubject = new HtmlTableCell();
        HtmlTableCell cellTemplateActive = new HtmlTableCell();
        HtmlTableCell cellTemplateButton = new HtmlTableCell();
 
        DropDownList Site = new DropDownList();
        DropDownList Template = new DropDownList();
        TextBox Subject = new TextBox();
        RadButton Activo = new RadButton();
        ImageButton Aceptar = new ImageButton();
        ImageButton Cancelar = new ImageButton();
 
        DataTable dtSite = TENDERS_Administracion_DefinicionEnvioNotificaciones.getSites();
        DataRow drowSite = dtSite.NewRow();
        drowSite["COD_ITEM"] = "-1";
        drowSite["TXT_ITEM"] = "";
        dtSite.Rows.InsertAt(drowSite, 0);
 
        Site.DataSource = dtSite; //TENDERS_Administracion_DefinicionEnvioNotificaciones.getSites();
        Site.DataValueField = "COD_ITEM";
        Site.DataTextField = "TXT_ITEM";
        Site.Width = new Unit(70, UnitType.Percentage);
        Site.ID = "SiteRule";
 
        DataTable dtTemplate = TENDERS_Administracion_DefinicionEnvioNotificaciones.getTemplates();
        DataRow drowTemplate = dtTemplate.NewRow();
        drowTemplate["COD_ITEM"] = "-1";
        drowTemplate["TXT_ITEM"] = "";
        dtTemplate.Rows.InsertAt(drowTemplate, 0);
 
        Template.DataSource = dtTemplate; //TENDERS_Administracion_DefinicionEnvioNotificaciones.getTemplates();
        Template.DataValueField = "COD_ITEM";
        Template.DataTextField = "TXT_ITEM";
        Template.Width = new Unit(70, UnitType.Percentage);
        Template.ID = "TemplateRule";
 
        Subject.Width = new Unit(70, UnitType.Percentage);
        Subject.Style.Add("padding", "unset");
        Subject.Style.Add("height", "unset");
        Subject.Style.Add("border-color", "unset");
        Subject.Style.Add("border-radius", "unset");
        Subject.ID = "SubjectRule";
 
        Activo.ToggleType = ButtonToggleType.CheckBox;
        Activo.ButtonType = RadButtonType.ToggleButton;
        Activo.ToggleStates.Add("Activado");
        Activo.ToggleStates.Add("Desactivado");
        Activo.ID = "ActivoRule";
 
        Aceptar.ImageUrl = "~/MRA/img/Ico/guardar.png";
        Aceptar.CssClass = "GuardarRegla";
        Aceptar.ToolTip = "Guardar";
        Aceptar.CommandName = "Guardar";
        Aceptar.Style.Add("width", "11px");
        Aceptar.Style.Add("height", "11px");
        Aceptar.Style.Add("padding", "unset");
        Aceptar.Style.Add("border-radius", "unset");
        Aceptar.Style.Add("margin-right", "unset");
        Aceptar.Style.Add("border","unset !important");
 
        Cancelar.ImageUrl = "~/MRA/img/Ico/eliminar2.png";
        Cancelar.CssClass = "EliminarCondicion";
        Cancelar.ToolTip = "Cancelar";
        Cancelar.CommandName = "Cancelar";
        Cancelar.Style.Add("width", "11px");
        Cancelar.Style.Add("height", "11px");
        Cancelar.Style.Add("padding", "unset");
        Cancelar.Style.Add("border-radius", "unset");
        Cancelar.Style.Add("margin-right", "unset");
        Cancelar.Style.Add("margin-left", "4px");
        Cancelar.Style.Add("border", "unset !important");
 
        if (((Telerik.Web.UI.GridItem)container.NamingContainer).DataItem != null && (((Telerik.Web.UI.GridItem)container.NamingContainer).DataItem).ToString() != "Telerik.Web.UI.GridInsertionObject")
        {
            DataTable dtData = ((System.Data.DataRowView)((Telerik.Web.UI.GridItem)container.NamingContainer).DataItem).DataView.Table;
 
            Site.SelectedValue = dtData.Rows[0]["Cod_Site"].ToString();
            Template.SelectedValue = dtData.Rows[0]["Cod_Template"].ToString();
            Subject.Text = dtData.Rows[0]["Subject"].ToString();
            Activo.Checked = dtData.Rows[0]["COD_ACTIVE"].ToString() == "S" ? true : false;
        }
 
        cellTemplate.Style.Add("width", "2%");
        cellTemplateSite.Controls.Add(Site);
        cellTemplateSite.Style.Add("width", "10%");
        cellTemplateTemplate.Controls.Add(Template);
        cellTemplateTemplate.Style.Add("width", "40%");
        cellTemplateSubject.Controls.Add(Subject);
        cellTemplateSubject.Style.Add("width", "40%");
        cellTemplateActive.Controls.Add(Activo);
        cellTemplateActive.Style.Add("width", "10%");
        cellTemplateButton.Controls.Add(Aceptar);
        cellTemplateButton.Controls.Add(Cancelar);
 
        rowTemplate.Cells.Add(cellTemplate);
        rowTemplate.Cells.Add(cellTemplateSite);
        rowTemplate.Cells.Add(cellTemplateTemplate);
        rowTemplate.Cells.Add(cellTemplateSubject);
        rowTemplate.Cells.Add(cellTemplateActive);
        rowTemplate.Cells.Add(cellTemplateButton);
 
        tableLine.Rows.Add(rowTemplate);
 
        container.Controls.Add(tableLine);
    }
    public System.Collections.Specialized.IOrderedDictionary ExtractValues(System.Web.UI.Control container)
    {
        OrderedDictionary od = new OrderedDictionary();
 
        od.Add("IDRegla", ((RadGrid)container.Parent.Parent.Parent).Attributes["IDRegla"].ToString());
 
        od.Add("Cod_Notification", ((GridEditFormItem)(container)).ParentItem.OwnerTableView.DataKeyValues[((GridDataItem)(((GridEditFormItem)(container)).ParentItem)).ItemIndex]["Cod_Notification"].ToString());
        od.Add("Cod_Site", ((GridEditFormItem)(container)).ParentItem.OwnerTableView.DataKeyValues[((GridDataItem)(((GridEditFormItem)(container)).ParentItem)).ItemIndex]["Cod_Site"].ToString());
        od.Add("Cod_Template", ((GridEditFormItem)(container)).ParentItem.OwnerTableView.DataKeyValues[((GridDataItem)(((GridEditFormItem)(container)).ParentItem)).ItemIndex]["Cod_Template"].ToString());
 
        od.Add("Site", ((DropDownList)(((GridEditFormItem)(container)).FindControl("SiteRule"))).SelectedValue);
        od.Add("Template", ((DropDownList)(((GridEditFormItem)(container)).FindControl("TemplateRule"))).SelectedValue);
        od.Add("Subject", ((TextBox)(((GridEditFormItem)(container)).FindControl("SubjectRule"))).Text);
        od.Add("Active", ((RadButton)(((GridEditFormItem)(container)).FindControl("ActivoRule"))).Checked == true ? 'S' : 'N');
        return od;
    }
 
}
 

 

But I have some problems.

- The form template doesn't disappear when used a imagebutton.

- When used the imagebutton to save data, I can't read ExtractValues for my form template class, because the ItemCommand doesn't use MyEditFormTemplate class.

 

protected void gridTemplate_ItemCommand(object sender, GridCommandEventArgs e)
    {
        string command = e.CommandName;
 
        if (command == "Cancelar")
        {
            e.Canceled = true;
        }
        else if (command == "Guardar")
        {
            e.Canceled = true;
            GridDataItem grid = ((GridDataItem )(e.Item));
            Hashtable table = new Hashtable();
            grid.ExtractValues(table);
        }
        //e.KeepInEditMode = true;
        //((RadGrid)e.Item.Parent.Parent.Parent).DataBind();
        ((RadGrid)e.Item.Parent.Parent.Parent).Rebind();
    }

 

Any Idea?

Thank you very much

 

 

Attila Antal
Telerik team
 answered on 04 Jan 2019
2 answers
138 views

Hi

We have aspx page where is added Telerik ReportViewer element:

<telerik:ReportViewer ID="ReportViewer1" runat="server" Height="99%" Width="99%"></telerik:ReportViewer>

 

In cs file we set stuff to that report viewer:

Telerik.Reporting.UriReportSource uriReportSource = new Telerik.Reporting.UriReportSource();
uriReportSource.Uri = urlParams["ReportFile"];
bool ParametersAreaVisible = true;
//... some url params handling and loop where inside param add is done this way
uriReportSource.Parameters.Add(new Telerik.Reporting.Parameter(key, urlParams[key]));
//... url params handling ended
ReportViewer1.ReportSource = uriReportSource;                       
ReportViewer1.ParametersAreaVisible = ParametersAreaVisible;

 

Problem is that from our own test environment we can run reports properly. Customer get vpn connection to our network and can run reports from same environment properly.

Customer has virtual server in azure cloud enviroment where currently is only allowed our and customer connections. From there we can run reports properly, but when customer try to use that page from their network, it will wait long (about minute) and get only toolbar of ReportViewer, no parameters area above that toolbar or any information about db connection problems or something else below.

Any idea where problem could be?

Silviya
Telerik team
 answered on 04 Jan 2019
3 answers
282 views

Hello,

I have a radmenu in which when i am clicking on a menu to open it to navigate on other page , the menu item pops up again before it navigate on other page.

Below I have attached a javascript which i have tried to open and close radmenu item:

function OnClientMouseOverHandler(sender, args) {
                     sender.set_clicked(false);
                 }
                 function OnClientItemClicking(sender, args) {
                     var item = args.get_item()

                     if (item.get_parent() !== sender) {
                         item._toggleState();
                     } else {
                         if (item.get_isOpen()) {
                             sender.close(true);
                             args.set_cancel(true)
                         }
                     }
                     if (item.get_items().get_count() == 0) {
                         sender.close(true);
                     }
                 }

I need to do it like that when i am clicking on any menu item to navigate on another page, menu should not get pop ups. It should stay open till navigate on another page or when i am clicking on menu item to navigate menu should close before navigation. 

Below I have attached a gif from that you will get to know what is the problem.

Kindly, help me with best solution. 

Marin Bratanov
Telerik team
 answered on 03 Jan 2019
1 answer
108 views
When using fields with the date/time picker (or even just the date picker) how can we get the picker to skip over the date/time dropdowns? If I enter a date of 1/2/2019 and tab I want it to go to the next field and not the date/time dropdowns. This not only will remove two tabs but also prevent the dropdown from continue to show until someone clicks somewhere else.
Rumen
Telerik team
 answered on 03 Jan 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?