Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
124 views
I have recently upgraded a RadGrid from the ASP.NET version to the latest ASP.NET AJAX version.  I am running into some problems with sizing.  When the grid first loads, you can see the data and the grid looks normal for about a second.  Then, the grid 'gets squished', and I can only see half of the first row.  I am able to resize the grid with javascript to make it look normal, but then it has a flicker effect, and it looks even worse with the more records that are loaded. Below is my grid declaration and related javascript code.  I need for the grid to maintain its height when the page loads.  Does anyone know why it might be doing this?

 

<telerik:RadGrid ID="dgHistory" runat="server"

 

 

Skin="Office2007"

 

 

Height="100%"

 

 

Width="100%"

 

 

EnableViewState="false"

 

 

AutoGenerateColumns="False" >

 

 

<MasterTableView AllowSorting="true" AllowNaturalSort="true" EnableViewState="false" TableLayout="Auto" >

 

 

<HeaderStyle Width="100%" />

 

 

<ItemStyle Font-Size="X-Small" Font-Names="Arial" HorizontalAlign="Left" Wrap="True" BackColor="ActiveCaptionText" />

 

 

<AlternatingItemStyle Font-Size="X-Small" Font-Names="Arial" HorizontalAlign="Left" Wrap="True" BackColor="Control" />

 

 

</MasterTableView>

 

 

<HeaderStyle Wrap="false" />

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="true" />

 

 

<Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" />

 

 

<ClientEvents OnRowSelected="RowSelected" />

 

 

<Resizing EnableRealTimeResize="false" ResizeGridOnColumnResize="False" />

 

 

</ClientSettings>

 

 

<GroupingSettings CaseSensitive="false" />

 

 

</telerik:RadGrid>

 

 

function Resize() {

 

 

 

 

 

var scrollArea = document.getElementById("<%= dgHistory.ClientID %>" + "_GridData");

 

 

if(scrollArea){

 

setTimeout(

function(){

 

 

var header = document.getElementById("<%= dgHistory.ClientID %>" + "_GridHeader");

 

scrollArea.style.height = document.body.offsetHeight - (header.offsetHeight * 3.5) +

"px";

 

scrollArea.style.height = document.body.offsetHeight - header.offsetHeight - 32 +

"px";

 

}, 200);

}

 

 

 

}

Sebastian
Telerik team
 answered on 16 Feb 2009
2 answers
141 views
I have a website that uses SSL for its login page.  Everything is fine with IE7, FireFox and Chrome, however, during tests with IE8, I am getting the warning about some of the objects not being secured.

After troubleshooting the issue, I have noticed the problem comes up with these resources, which are requested via HTTP and not HTTPS:

ScriptResource.axd
Telerik.Web.UI.WebResource.axd

Here is the sequence of events:
http://ezactions.com:443
http://ezactions.com/ScriptResource.axd?d=6_rC-k1d89McuRoHt2U4ocZqJKsdtuBrCOxyh8MtxrYkmSEppV0VnRS3cc1JG-R5-9uPQp35ZwjOxGsXU3rzpA2&t=633370451355781250
http://ezactions.com/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_HiddenField&_TSM_CombinedScripts_=;;Telerik.Web.UI,+Version=2008.1.619.20,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:16ee7c61-0c72-4885-ba3b-3c21a3307fa9:393f5085:34f9d57d;System.Web.Extensions,+Version=1.0.61025.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:1f0f78f9-0731-4ae9-b308-56936732ccb8:e481177b;Telerik.Web.UI,+Version=2008.1.619.20,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:16ee7c61-0c72-4885-ba3b-3c21a3307fa9:5edc7ae2
http://ezactions.com:443
http://ezactions.com:443



Does anyone have any idea how to fix this issue?

The live URL for testing is https://www.ezactions.com/login.aspx.

Thanks!

Fabio Videira.
Fabio Videira
Top achievements
Rank 2
 answered on 16 Feb 2009
1 answer
84 views
Hi,
It's possible to add a delay to the OnClientRequesting event?
This to avoid to fire the event many times.
For example:
If the user want to filter the items starting with "sa", He press "s" and "a" rapidly, the events is fired two times but, adding a delay of 500mSec (or other...), the event is fired only one time.

Thanks.
Giorgio
Simon
Telerik team
 answered on 16 Feb 2009
2 answers
154 views
Hi,


I was wondering how I could extend my RadChart border at the bottom dynamically. For example, If I have a legend which gets too long or if the X-Axis lables get too long ( when aligned at an angle), I would like my chart border to expand downwards to accommodate these elements.


Can you please suggest me a pointer to achieve this?


Thanks,
Ketan Reddy
ketan reddy
Top achievements
Rank 1
 answered on 16 Feb 2009
1 answer
535 views
Hello!

I receive the error Cannot find any bindable properties in an item from the datasource when I try to achieve client-side databinding with the help of a webservice.
I use one class to handle all calls to my stored procedures. They return a DataTable. When I use these calls in RadGrid1_NeedDataSource() to bind data with RadGrid1.DataSource = myClass.GetDataTable(); it works fine.
But when I place the same call in a WebService and use that Webservice in my javascript functions it does not.

in myService.cs:
[WebMethod]
public DataTable bindData()
{
   return myClass.GetDataTable();
}

my javascript:
function pageLoad(sender, args)
{
    setInterval("myService.bindData(updateGrid)", 1000);
}
function updateGrid(result)
{
     //var grid = $find("<%= RadGrid1.ClientID %>");
     //grid.DataSource = result;
     var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
     tableView.set_dataSource(result);
     tableView.dataBind();
}

In my RadGrid I use an ItemTemplate.


Tsvetoslav
Telerik team
 answered on 16 Feb 2009
1 answer
107 views

I am using an Item template with an custom attribute Offset. Everything works ok except I am getting a lot of validation warnings on my Offset attribute. Is there a way to avoid them?

<telerik:RadComboBox runat="server" ID="ddlDayOffset" AllowCustomText="false" NoWrap="true" Width="40ex" 
MarkFirstMatch="true" HighlightTemplatedItems="True">  
<ItemTemplate> 
<div><span style='font-weight:bolder'><%# DataBinder.Eval(Container, "Attributes['Offset']") %></span> the appointment day</div> 
</ItemTemplate> 
<Items> 
<telerik:RadComboBoxItem Offset="3 weeks before" Value="-21"  /> 
<telerik:RadComboBoxItem Offset="20 days before" Value="-20" /> 
<telerik:RadComboBoxItem Offset="19 days before" Value="-19" /> 
<telerik:RadComboBoxItem Offset="18 days before" Value="-18" /> 
<telerik:RadComboBoxItem Offset="17 days before" Value="-17" /> 
 

Atanas Korchev
Telerik team
 answered on 16 Feb 2009
1 answer
137 views
Can someone give me the run-down of the pros and cons for usings ItemsRequested vs. Webservice?
Simon
Telerik team
 answered on 16 Feb 2009
1 answer
378 views
Here is my situation, this might not be the best solution, but it almost works:

I have a master page with a radmenu in it.  The menu item is a template item and in it I have a radajaxpanel (is this advised?).  This menu item shows a folder structure that i created along with a text box that lets you type ahead to filter the folders that show in the menu updating the radajaxpanel.   This works great on most pages, however, on pages where the child page contains a rad grid, the rad grids PreRender method keeps getting called which dramatically slows down the type ahead.  Who is calling the PreRender method?  Any ideas on how to track that down.  I put break points everywhere but it just keeps going into PreRender and I can't tell why it goes in there.  It never calls the NeedDataSource method.

This is in the RadCodeBlock
function SearchFolders() { 
                var tb = $get('<%=RadMenu1.Items[0].Items[0].FindControl("FolderSearchPhrase").ClientID%>'); 
                if (tb.value == "") { 
                    //var ajaxMgr = $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>"); 
                    //ajaxMgr.ajaxRequest("ResetTree"); 
                    var ajaxPanel = $find('<%=RadMenu1.Items[0].Items[0].FindControl("RadAjaxPanel1").ClientID %>'); 
                    ajaxPanel.ajaxRequest("ResetTree"); 
                } 
                else { 
                    //var ajaxMgr = $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>"); 
                    //ajaxMgr.ajaxRequest("SearchFolders"); 
                    var ajaxPanel = $find('<%=RadMenu1.Items[0].Items[0].FindControl("RadAjaxPanel1").ClientID %>'); 
                    ajaxPanel.ajaxRequest("SearchFolders"); 
                } 
            }  

Code Behind of master page
protected void PanelRequest(object sender, AjaxRequestEventArgs e) 
    { 
if (e.Argument == "ResetTree") 
        { 
            thisUser = new User(2); 
            Folder f = new Folder(); 
            if (Request.QueryString["folderid"] == null || Request.QueryString["folderid"] == "") 
            { 
                f.FolderID = 0; 
            } 
            else 
            { 
                f.FolderID = Convert.ToInt32(Request.QueryString["folderid"]); 
            } 
            FolderList fl = new FolderList(thisUser, f, thisUser); 
            Session["FolderList"] = fl; 
            HiddenField TreePageNum = (HiddenField)RadMenu1.Items[0].Items[0].FindControl("TreePageNum"); 
            TreePageNum.Value = "1"; 
            m_Pagenum = Convert.ToInt32(TreePageNum.Value); 
            LoadTreePanel(); 
        } 
        else if (e.Argument == "SearchFolders") 
        { 
            thisUser = new User(2); 
            TextBox searchPhrase = (TextBox)RadMenu1.Items[0].Items[0].FindControl("FolderSearchPhrase"); 
            FolderList fl; 
            if (searchPhrase.Text.Trim().Length == 0) 
            { 
                Folder f = new Folder(); 
                if (Request.QueryString["folderid"] == null || Request.QueryString["folderid"] == "") 
                { 
                    f.FolderID = 0; 
                } 
                else 
                { 
                    f.FolderID = Convert.ToInt32(Request.QueryString["folderid"]); 
                } 
                fl = new FolderList(thisUser, f, thisUser); 
            } 
            else 
            { 
                fl = new FolderList(thisUser, searchPhrase.Text); 
            } 
            Session["FolderList"] = fl; 
            HiddenField TreePageNum = (HiddenField)RadMenu1.Items[0].Items[0].FindControl("TreePageNum"); 
            TreePageNum.Value = "1"; 
            m_Pagenum = Convert.ToInt32(TreePageNum.Value); 
            LoadTreePanel(); 
        } 
    }

LoadTreePanel ends with this
        Panel TreePanel = (Panel)RadMenu1.Items[0].Items[0].FindControl("TreePanel"); 
        TreePanel.Controls.Clear(); 
        TreePanel.Controls.Add(new LiteralControl(html.ToString())); 

Anything here that would cause the child page to fire the RadGrid's PreRender
Iana Tsolova
Telerik team
 answered on 16 Feb 2009
1 answer
110 views
Hi!

When i´m trying to set the Visible property of the RadEditor to "True", from a previous "False" state, it is not loading correctly after the first postback using Ajax and a button click.
When i use the OnClientLoad="alert('Some text')" RadEditor property it works correctly.
It´s seems to be a bug.

Kind regards,

Adrian

-------------------------------------------------------------------------------------------------------------------------

ASPX Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="radScriptManager" runat="server">
    </telerik:RadScriptManager>
    
        <telerik:RadAjaxManager ID="radAjaxManager" runat="server">
        <AjaxSettings>
        
            <telerik:AjaxSetting AjaxControlID="buttonA">
                <UpdatedControls>                    
                    <telerik:AjaxUpdatedControl ControlID="radEditor"  />
                </UpdatedControls>
            </telerik:AjaxSetting>

        </AjaxSettings>
    </telerik:RadAjaxManager>
    
    <div id="divEditor" runat="server">   
        <telerik:RadEditor ID="radEditor" runat="server" Width="100%" Height="500px">            
        </telerik:RadEditor>
        
        <asp:Button ID="buttonA" runat="server" OnClick="ButtonAClick" />
    </div>
    
    </form>
</body>
</html>

-------------------------------------------------------------------------------------------------------------------------

CS Code:

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Web.Script.Services;

public partial class Default : System.Web.UI.Page
{
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            radEditor.Visible = false;
        }
    }

    protected void ButtonAClick(object sender, EventArgs e)
    {
        radEditor.Visible = !radEditor.Visible;
    }
}
Rumen
Telerik team
 answered on 16 Feb 2009
1 answer
76 views
Hi

Is there a way to get the imagefilename and url of the image clicked on using clientside Javascript? 
Fiko
Telerik team
 answered on 16 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?