Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
70 views
I am having an issue only in IE7, it works fine in IE8. The issue is that the drop down is only active when hovering over the text of the selected item not when over the rest of the drop down not even the arrow. I have added screenshots of what is happening also. The control is in a user control on a page with other user controls. The aspx is below:

 

 

 

<div id="LoadReportPanel">
         <div style="float: right">
            ...
         </div>
         <div style="float: right; padding-top: 2px;">
            <div style="position: absolute; top: 38px; left: 4px; z-index: 9999999;">
               ...
            </div>
            <asp:Label ID="Label1" runat="server" Text="Report Template: "></asp:Label>
            <telerik:RadComboBox ID="ReportTemplatesDropDown" runat="server" Width="300px" Height="250">
               <ItemTemplate>
                  <div id="ReportTemplatesDropDownTreeViewDIV">
                     <telerik:RadTreeView ID="ReportTemplatesDropDownTreeView" runat="server" Expanded="True">
                     </telerik:RadTreeView>
                  </div>
               </ItemTemplate>
               <Items>
                  <telerik:RadComboBoxItem runat="server" Text="Select a Report Template" />
               </Items>
            </telerik:RadComboBox>
         </div>
      </div>

Simon
Telerik team
 answered on 03 Dec 2010
2 answers
141 views
I have a RadComboBox using LoadOnDemand with CloseDropDownOnBlur set to true. I also let the user enter custom text. However, if the user enters the text and tabs out of the field before the combo is done "loading" the values, the dropdown won't disappear until you go back to the cell and leave it again.

Any ideas?
Kalina
Telerik team
 answered on 03 Dec 2010
5 answers
111 views
Hi,

I'm trying to create a gridview with multiple columns that can contain different kinds of System.Web.UI.Controls in Code-Behind. One of them is a radComboBox.
When I add the radComboBox performance drops down dramatically, but I can't find the exact problem.
Is there something I am doing wrong, or is this a known issue?

Below is the Code-Behind file:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
using System.ComponentModel;
using System.Collections;
using System.Collections.Specialized;
 
namespace WebApplication1
{
     
    // Default Page
    public partial class _Default : System.Web.UI.Page
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
 
            if (IsPostBack)
                createStaticControls();           
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                createStaticControls();           
        }
 
 
        private void createStaticControls()
        {
            int index = 0;
 
            GridViewExtension gridView = new GridViewExtension();
            gridView.EnableInsert = true;
            gridView.rowSize = 20;
            Panel1.Controls.Add(gridView);
 
            while (index != 5)
            {
                TemplateField tfield = new TemplateField();
                tfield.Visible = true;
                tfield.ItemTemplate = new DynamicControl(index);
                tfield.HeaderText = index.ToString();
                gridView.Columns.Add(tfield);
 
                index++;
            }
 
            gridView.DataBind();
 
            Button b = new Button();
            Panel1.Controls.Add(b);
        }
    }
 
 
    // Control - ITemplate, now always an RadComboBox
    public class DynamicControl : ITemplate
    {
        private int index;
 
        public DynamicControl(int _index)
        {
            index = _index;
        }
 
        public void InstantiateIn(System.Web.UI.Control container)
        {
            RadComboBox realControl = new RadComboBox();
            //Label realControl = new Label();      // Label much faster
 
            realControl.Enabled = true;
            realControl.Visible = true;
            realControl.ID = index.ToString();
            realControl.Text = index.ToString();
 
            container.Controls.Add(realControl);
        }
    }
 
 
    // GridView Extension, make empty rows with staticControls
    public class GridViewExtension : System.Web.UI.WebControls.GridView
    {
        public int rowSize;
        public bool EnableInsert;
 
        // Override the creation of childControls to create empty rows
        protected override int CreateChildControls(System.Collections.IEnumerable dataSource, bool dataBinding)
        {
            //create table
            Table table = new Table();
            table.ID = this.ID;
 
            //create a new header row
            GridViewRow row = base.CreateRow(-1, -1, DataControlRowType.Header, DataControlRowState.Normal);
 
            //convert the exisiting columns into an array and initialize
            DataControlField[] fields = new DataControlField[this.Columns.Count];
            this.Columns.CopyTo(fields, 0);
            this.InitializeRow(row, fields);
            table.Rows.Add(row);
 
            this.Controls.Add(table);
 
            while (rowSize != 0)
            {
                this.CreateInsertRow(rowSize, false);
                rowSize--;
            }
 
            return 0;
        }
 
        protected virtual void CreateInsertRow(int rowIndex, bool allowPaging)
        {
            GridViewRow row = this.CreateRow(rowIndex, -1, DataControlRowType.DataRow, DataControlRowState.Insert);
            row.ID = rowIndex.ToString();
 
            DataControlField[] fields = new DataControlField[this.Columns.Count];
            this.Columns.CopyTo(fields, 0);
 
            if (this.HasControls())
            {
                int index = ((Table)this.Controls[0]).Rows.Count - (this.ShowFooter ? 1 : 0) - (allowPaging ? 1 : 0);
                ((Table)this.Controls[0]).Rows.AddAt(index, row);
            }
 
            this.InitializeRow(row, fields);
        }
    }
}


Thanks,
Klaas
Simon
Telerik team
 answered on 03 Dec 2010
13 answers
170 views

Hi,

I am developing a report screen for internal use on my company and I need to have the RadWindow functionality enabled, however I ran into an issue with positioning. I've searched a lot about it but couldn't find a solution for the issue.

For the record, I'm using VS2010, Framework 4.0, Windows 7, Telerik RadControls for ASP.NET AJAX Q1 2010 SP1.

I'm calling the rad window through radopen on client-site as you can see below (some parts of the script have been removed):

var ReportHandler = function () {  
    var lnkExportToExcel;  
     // other implementation 
     
    var GetQueryString = function () {  
        // other implementation  
    };  
      
    var lnkExportToExcel_Click = function (event) {  
        window.radopen("ExportOptions.aspx?" + GetQueryString(), "wndExportOptions");  
        return false;  
    };  
      
    var EndRequestHandler = function () {  
        InitializeReportHandler();  
        // other implementation  
    };  
      
    var InitializeReportHandler = function () {  
      
        lnkExportToExcel = $("#lnkExportToExcel");  
        lnkExportToExcel.bind("click", null, lnkExportToExcel_Click);  
      // other implementation  
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);  
    };  
      
    this.Start = function () {  
        InitializeReportHandler();  
    };  
}  
      
$(function () {  
    new ReportHandler().Start();  
});

 

This is the markup of the content page which uses the script:


[...]   
<asp:Content ID="theBody" ContentPlaceHolderID="MainContent" runat="server">   
<form id="frmReport" runat="server">   
    <asp:ScriptManager ID="transactionStatisticsScriptManager" runat="server" />   
    <telerik:RadWindowManager ID="tsWindowManager" Overlay="true" runat="server" Behaviors="Move,Close">   
        <Windows>   
            <telerik:RadWindow ID="wndExportOptions" runat="server" Modal="true" Overlay="true" IconUrl="/images/procom.png" Title="Export Options" VisibleStatusbar="false" Height="210px" Width="300px" ShowContentDuringLoad="false">   
            </telerik:RadWindow>   
            <telerik:RadWindow ID="wndViewDetails" runat="server" Modal="true" Overlay="true" IconUrl="/images/procom.png" Title="View Details" VisibleStatusbar="false" Height="450px" Width="900px" ShowContentDuringLoad="false">   
            </telerik:RadWindow>   
        </Windows>   
    </telerik:RadWindowManager>   
    <asp:UpdatePanel ID="transactionStatisticsUpdatePanel" runat="server">   
        </ContentTemplate>   
            [...]   
            <telerik:RadGrid ID="grdSearchResults" Width="968px" runat="server" [...Other definitions...]>  
                <MasterTableView EnableNoRecordsTemplate="true" CommandItemDisplay="Top">  
                <CommandItemTemplate>  
                    <a id="lnkExportToExcel" href="#">  
                        <img src="images/excel.gif" 
                             width="22px" 
                             height="22px" 
                             border="0px" 
                             alt="<%= GetGlobalResourceObject("TransactionStatistics", "ExportToExcelAlt").ToString() %>"  
                             title="<%= GetGlobalResourceObject("TransactionStatistics", "ExportToExcelAlt").ToString() %>"/>  
                    </a>  
                </CommandItemTemplate>  
                [...Rest of the Grid...]  
            [...]  
        </ContentTemplate>   
    </asp:UpdatePanel>   
    <script src="scripts/jquery-1.4.1.js" type="text/javascript"></script>  
    <script src="scripts/ReportHandler.dev.js" type="text/javascript"></script>  
</form>   
</asp:Content>

The rad window is being displayed when I click the excel image defined on the CommandItemTemplate section, however, it does not display it on the correct position. I haven't modified anything regarding the position of the window either through markup or css; I was expecting it to be centralized by default.

What happens is that it opens a bit past the center torwards the right side of the page. I can see that the overlay is also being displayed with a huge space (some sort of margin/padding or whatever) from the left side of the browser window, as if it was starting form the actual content page and not from the entire page (which is a merge from master page and content) so I would assume it does not support master page, but I hope is not the case.

Another very annoying issue I'm having is that when I close the RadWindow, if I click the button again, it opens even more on the right, and it happens subsequently until it's completely off the screen. The horizontal scroll bar has a lot more space to be rolled torwards the left and it increases every time I open one of these windows.

Also, if I try to drag the window around, it makes the horizontal scroll bar go nuts and gets even larger. As soon as I drop the window on the position I want, it moves itself to the right, completely going off the screen.

Please see the attached images to have an idea of what's happening on the UI.

img1.png shows the screen before I click the export to excel icon;
img2.png shows the screen when I click the export to excel icon for the first time;
img3.png shows the screen when I click the export to excel icon for the second time.

I haven't added more images, but the behaviour is the same, it keeps going torwards the right until it's completely off the screen and the scroll bar gets huge.

I really need some help with this guys.

Thanks

Update: It seems to have a normal behavior when I run the app using a one-monitor computer with small screen resolution (1024x768). The screenshots I sent previously where from a two-monitor computer on a 1920x1080 screen resolution. I have added an attachment (problem with safari, had to add attachment on other post of this same thread) which shows the expected behavior. 

Thiago
Top achievements
Rank 1
 answered on 03 Dec 2010
6 answers
151 views
I'm attempting to read values from a RadGrid.  I've listed the code below and it works and doesn't produce an error, however, it doesn't read any of the values from the RadGrid.


Protected

 

 

Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

 

 

 

For Each item As GridDataItem In rgLanguages.Items

 

Dim test As String = item("Language").Text

 

 

 

 

 

 

Next

 

 

 

End Sub

 

Michael
Top achievements
Rank 1
 answered on 03 Dec 2010
1 answer
99 views
hi,

in android emulator the scroller is invisible in radscheduler.. and in blackberry its visible but could not render.. is there any solution for this or are there any different telerik control for mobile devices available in market??
Kamen Bundev
Telerik team
 answered on 03 Dec 2010
4 answers
125 views
Is there any way to capture the click event from a decorated checkbox?
Brad
Top achievements
Rank 1
 answered on 03 Dec 2010
1 answer
103 views
Hi,
My relative path is like ---> "photos/pic1.jpg"... The relative links turns to absolute... I referred to posts and found your following JS function...
function OnClientPasteHtml(sender, args)
{
    var commandName = args.get_commandName();
    var value = args.get_value();
    if (commandName == "Paste")
    {
        var domainName = "http://" + window.location.host; //returns the hostname and port number of the current URL
        ... ... ... ... ...


But the problem is... When it turns to absolute, the URLs become as shown below depending on server.
I have URLs like --> http://www.xyz.com/sms_server1/photos/pic1.jpg  and http://www.xyz.com/sms_live/photos/pic1.jpg

Your following code --> var domainName = "http://" + window.location.host; ///// Returns the hostname and port number of the current URL

But it does not return ---->    sms_server1    OR     sms_live   etc...
How can I replace it...

Thanks,
Piyush
Rumen
Telerik team
 answered on 03 Dec 2010
3 answers
130 views
I'm trying to add in the css but the head is always in low
Telerik.Web.UI.WebResource.axd how do I fix this?
I need my css is upon Telerik.Web.UI.WebResource.axd but
that is what is in the head.
Vasil
Telerik team
 answered on 03 Dec 2010
2 answers
268 views
Hello,
I have editable grid with buttons in form:

<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>'
CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'


I use my validation and I show validation result outer the grid. How I can prevent closing edit form or insert form. It is possible to repopen edit form when I saved index of last open editform.
Konrad
Top achievements
Rank 1
 answered on 03 Dec 2010
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
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
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?