Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
450 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
359 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
144 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
296 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
116 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
3 answers
58 views

Hi,

 

I have a webservice bound scheduler and  Controller.GetAppointments drops some of the appointments even though sql query as seen in first list  returns correct number of appointments.

 Controller.GetAppointments takes these 45 appointments and returns 99 appointments( as seen in second list) as parent child appointments and drop some of the original appointments (42627, 41592  )in its internal processing, can anyone  tell me how to fix this issue?

 

Actual  appointments  returned(count=45) , more than half of these  appointments are recurring appointments

List: 29648: 29649: 29650: 32983: 40689: 40690: 301: 29908: 29909: 29910: 40229: 40230: 40231: 30428: 30429: 30430: 40456: 40457: 40458: 42418: 42665: 42666: 30688: 30689: 30690: 40913: 40914: 42586: 42589: 42595: 42602: 42623: 42635: 42639: 42653: 42660: 42663: 42664: 39550: 39551: 39552: 41590: 41591: 41592: 42627

 

 

 Appointments  Returned by Controller  (count = 99 ), this shows parent and child appointments

List: --->,  40690_0,  40689_0,  40913_0,  40914_0,  40231_0,  40230_0,  40229_0,  40457_0,  40458_0,  40456_0,  29909_0,  29908_0,  39551_0,  39550_0,  40689_1,  40690_1,  40914_1,  40913_1,  40230_1,  40229_1,  40231_1,  40456_1,  40457_1,  40458_1,  39551_1,  30428_1,  29648_1,  30430_1,  40690_2,  40689_2,  40913_2,  40914_2,  40229,  40231_2,  40230_2,  42586,  42589,  40457_2,  40456,  40458_2,  42664,  42663,  29648,  30690_2,  30689_2,  39552_2,  39550,  39551_2,  30688,  29908,  30428,  41590,  40689,  40690_3,  42602,  42623,  32983,  40913,  40914_3,  42653,  42639,  40230,  40229_2,  40231_3,  42660,  40458_3,  40456_2,  40457,  29909,  29648_2,  39551,  39550_2,  39552_3,  29650_3,  29649,  30689,  30429,  41591,  42418,  40690,  40689_3,  40914,  40913_3,  40231,  40230_3,  40229_3,  40458,  40456_3,  40457_3,  29648_3,  30429_3,  29650,  30430,  29649_3,  39550_3,  30690,  39552,  29910,  41592


Controller.GetAppointments<AppointmentData>(schedulerInfo) truncates some of the appointments in Month View.

 IEnumerable<AppointmentData> apts = Controller.GetAppointments<AppointmentData>(schedulerInfo);

 

Thanks,

Prava

Prava kafle
Top achievements
Rank 1
 answered on 02 Jan 2019
9 answers
109 views

I have a RadGrid inside a UserControl where I change the BackColor of each GridDataItem (aka row) based on a value in a cell so the users know the urgency of the rows data. If it is outside the bounds we don't change anything.

However when a row wraps around due to a cell with more text than width on the cells that I changed the background color of based on a cell value when you hover the mouse over the row it only highlights the first line of text in the row with the highlight hover color. Then on the rows we didn't change the background color of when you mouse over the row highlights correctly the full height of the row not just the first line of text.

I am following recommend way of changing the BackColor of a GridDataItem from a Telerik response to another thread in this forum.  Basically in the OnItemDataBound event I do the following:

if (goal <= 0.0)
    dataItem.BackColor = Color.FromName("#ffb2ae"); // Pastel Red
else if (goal > 0.0 && goal < 3.0)
    dataItem.BackColor = Color.FromName("#ffd394"); // Pastel Orange
else if (goal >= 3.0 && goal < 7)
    dataItem.BackColor = Color.FromName("#fdfd96"); // Pastel Yellow
else if (goal >= 7.0 && goal < 10)
    dataItem.BackColor = Color.FromName("a0e7a0"); // Pastel Green

 

See attached images for examples of output results. 

Any help to make the default hover color fill the full height of the cell when the BackColor is changed for a GridDataItem is greatly appreciated.

 

Attila Antal
Telerik team
 answered on 02 Jan 2019
0 answers
101 views

I have a radlistview item. On clicking of radlistview item i am generating dynamic controls as show in the code. Since dynamically generate controls not retain across post back so recreating every time. Controls are working fine but not generating in a proper order. All controls should generate one by one on clicking of list view but those are messing around, please some one suggest me how can i resolve this?
Thanks.

MARK UP:

<div id="divListView" style="overflow: auto; width: 100%;" class="sortable">
 <telerik:RadListView ID="RadListView1" runat="server" RenderMode="Lightweight" DataKeyNames="Label" ClientDataKeyNames="Label" ItemPlaceholderID="ListViewPlaceHolder1">                                 
    <LayoutTemplate>
       <div class="RadListView RadListView_Silk">
          <table id="orgcharttable" class="layoutTable" width="100%">
             <tr>
                 <td colspan="3" class="nopadding">
                    <asp:PlaceHolder ID="ListViewPlaceHolder1" runat="server"></asp:PlaceHolder>
                 </td>
             </tr>
          </table>
      </div>
  </LayoutTemplate>
 <ItemTemplate>
      <div id="divHighlight" class="ListViewStyle" onclick="SelectControl(this,event);">
          <div style="vertical-align: top; width: 100%">
              <table>
                 <tr id="tr1">
                    <td colspan="2" class="tdnormal">
                        <telerik:RadLabel ID="lbl1" runat="server" Text='<%# Bind("Label")%>' Font-Bold="true" CssClass="ItemHeaderStyle"></telerik:RadLabel>
                     </td>
                 </tr>
                 <tr id="tr2">
                     <td rowspan="2" colspan="1" style="width: 5%">
                     </td>
                 </tr>
             </table>
         </div>
      </div>
     </ItemTemplate>
  </telerik:RadListView>
 
  <asp:Table ID="Table1" runat="server" EnableViewState="false"></asp:Table>

Code Behind:

protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            RadListView1.DataSource = GetDatatable();
            RadListView1.DataBind();
        }
        else
        {
            RecreateControls("rtb", "RadTextBox");
            RecreateControls("rcb", "RadComboBox");              
        }
    }
    public DataTable GetDatatable()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("Label");
        dt.Rows.Add("RadTextBox");
        dt.Rows.Add("RadComboBox");
        return dt;
    }
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        string commandText = e.Argument.ToString().Trim();
        string[] splitdata = commandText.Split('&');
        commandText = splitdata[0];
        string controlName = splitdata[1];
        switch (controlName)
        {
            case "RadTextBox":
                int cnt1 = FindOccurence("rtb") + 1;
                DynamicControls dcTextBox = new DynamicControls();
                TableCell txtlblRad = dcTextBox.Controlscreation("RadLabel", "", cnt1, cnt1, "Text Box:", "", 0);
                TableCell txtRad = dcTextBox.Controlscreation("RadTextBox", "", cnt1, cnt1, "", "", 0);
                TableRow txtRow = new TableRow();
                txtRow.Cells.Add(txtlblRad);
                txtRow.Cells.Add(txtRad);
                Table1.Rows.Add(txtRow);
                break;
            case "RadComboBox":
                int cnt2 = FindOccurence("rcb") + 1;
                DynamicControls dcComboBox = new DynamicControls();
                TableCell combolblRad = dcComboBox.Controlscreation("RadLabel", "", cnt2, cnt2, "Combo box:", "", 0);
                TableCell comboRad = dcComboBox.Controlscreation("RadComboBox", "", cnt2, cnt2, "", "", 0);
                TableRow comboRow = new TableRow();
                comboRow.Cells.Add(combolblRad);
                comboRow.Cells.Add(comboRad);
                Table1.Rows.Add(comboRow);
                break;
        }
}
private void RecreateControls(string ctrlPrefix, string ctrlType)
    {
        string[] ctrls = Request.Form.ToString().Split('&');
        int cnt = FindOccurence(ctrlPrefix);
        if (cnt > 0)
        {
            for (int k = 1; k <= cnt; k++)
            {
                for (int i = 0; i < ctrls.Length; i++)
                {
                    if (ctrls[i].Contains(ctrlPrefix + "_" + k.ToString()))
                    {
                        if (ctrlType == "RadTextBox")
                        {
                            DynamicControls dcTextBox = new DynamicControls();
                            TableCell txtlblRad = dcTextBox.Controlscreation("RadLabel", "", k, k, "TextBox:", "", 0);
                            TableCell txtRad = dcTextBox.Controlscreation("RadTextBox", "", k, k, "", "", 0);
                            TableRow txtRow = new TableRow();
                            txtRow.Cells.Add(txtlblRad);
                            txtRow.Cells.Add(txtRad);
                            Table1.Rows.Add(txtRow);
                        }
                        if (ctrlType == "RadComboBox")
                        {
                            DynamicControls dcComboBox = new DynamicControls();
                            TableCell combolblRad = dcComboBox.Controlscreation("RadLabel", "", k, k, "Combo box:", "", 0);
                            TableCell comboRad = dcComboBox.Controlscreation("RadComboBox", "", k, k, "", "", 0);
                            TableRow comboRow = new TableRow();
                            comboRow.Cells.Add(combolblRad);
                            comboRow.Cells.Add(comboRad);
                            Table1.Rows.Add(comboRow);
                        }
                     }
                 }
              }
           }
        }
private int FindOccurence(string substr)
    {
        string reqstr = Request.Form.ToString();         
        return ((reqstr.Length - reqstr.Replace(substr, "").Length) / substr.Length);
    }
}
}

Expected Result: The Controls should generate one by one in order on click of listview, but generating in a group. Textboxes are generating as one group and dropdowns are generating as one group.

 

Saifulla
Top achievements
Rank 1
 asked on 02 Jan 2019
3 answers
176 views

I have the following tag which includes a handler for onfocusout.  The handler is executed when the user clicks away from the control when the down arrow button or the text area has focus but doesn't execute when the user has selected an item (or item check box) in the item list and then navigates away from the RadComboBox control.  How is it possible to have checkNeedToSaveOpportunity(event) executed if the user focuses on a list item and then navigates to some other part of the page?

<telerik:RadComboBox RenderMode="Lightweight" ID="cmbReportTool" filter="Contains" runat="server"
EmptyMessage="Select" oWrap="false"
onfocusout="checkNeedToSaveOpportunity(event)"
OnClientItemChecking="OnCMBClientItemChecking"
class="cmb-report-tool"
CheckBoxes="true"
width="100%">
</telerik:RadComboBox>

Marin Bratanov
Telerik team
 answered on 01 Jan 2019
3 answers
131 views
I know the current editor looks and works like old Word 2003/2007. I have no problems with it but with WordPress, Wix, Squarespace, and other online editors this editor majorly behind the times in having layout functionality that end users are expecting. 
Marin Bratanov
Telerik team
 answered on 01 Jan 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?