Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
195 views
With DevExpress, when I drop a gridview control into a page with no width setting the grid will size itself according to header/row contents.

With Telerik, the gridview with no width property configured will expand to 100% of the width of the container it's in. I do not want to configure the width. I looked through several forum posts here and was unable to find a solution. Although I did attempt to change several settings while searching for a solution, this happens with all properties set to their default values.
Dimo
Telerik team
 answered on 17 Dec 2009
3 answers
189 views
Hi all,

I have a radCombobox that I'm loading with data on the ItemsRequested method.  I'm using a stored procedure to grab data that is "%like%" the text the user types in.  This works great...until what they have typed no longer returns any records.  Once this is the case, no matter what they do, backspace, exit the control and return, the control stops executing the ItemsRequested method.  There is no postback, no attempt to run the method on the server side.

I'm including the code of my combobox and my ItemsRequested method.

I tried to apply the fix found here from my post here but with no success.

So, can anyone help with this?  

Thanks,
Joshua Wise

HTML Script:

<telerik:RadComboBox runat="server" ID="radAccount" DropDownWidth="400px" EnableVirtualScrolling="True" 
            Height="150px" AllowCustomText="true" MarkFirstMatch="true" 
            Skin="WebBlue" OnItemsRequested="radAccount_ItemsRequested" OnSelectedIndexChanged="radAccount_SelectedIndexChanged" 
            EnableLoadOnDemand="true"  OnTextChanged="radAccount_TextChanged"  
            AutoPostBack="True"
            <ItemTemplate> 
                <table class="ComboBoxTable"
                    <tr> 
                        <td class="LeftCellComboBox"
                            <%# DataBinder.Eval(Container, "Attributes['acctcat']")%> 
                        </td> 
                        <td class="LeftCellComboBox"
                            <%# DataBinder.Eval(Container, "Attributes['Description']")%> 
                        </td> 
                    </tr> 
                </table> 
            </ItemTemplate> 
            <CollapseAnimation Type="OutQuint" Duration="1"></CollapseAnimation> 
        </telerik:RadComboBox> 



Server Side C# Code

 protected void radAccount_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) 
    { 
 
        DataRow[] data = GetData(e.Text); 
 
 
        e.EndOfItems = endOffset == data.Count(); 
 
        radAccount.Items.Clear(); 
 
 
 
        for (int i = 0; i < data.Count(); i++) 
        { 
 
            RadComboBoxItem item = new RadComboBoxItem(); 
 
            item.Text = (string)data[i]["acctcat"]; 
            item.Value = data[i]["acctcat"].ToString(); 
 
            item.Attributes.Add("acctcat", data[i]["acctcat"].ToString()); 
            item.Attributes.Add("Description", data[i]["Description"].ToString()); 
 
            radAccount.Items.Add(item); 
 
            item.DataBind(); 
        } 
 
        //e.Message = GetStatusMessage(endOffset, data.Rows.Count); 
 
 
 
 
    } 

In this I get an array of DataRows which I then add attributes to for the control.





   
Simon
Telerik team
 answered on 17 Dec 2009
7 answers
365 views
Hi, I am using Tekerik controls and in one of my webpage, I used RadDatePicker. Somehow, none of the images are visible when I click on DatePicker, its not showing any background-image or any next month, prev month etc images. Date Controls seems to be Transparent.  All the images are embedded so I am not sure what else to check. I am pasting all of my code related to RadDatePicker here, can someone please help me to see why Its not showing any images?
Just some more information, I have some ASP:Panels on my page too and have master page also. So This code is placed under <ASP:Content>
###############################################################################

<table> 
 
                    <table > 
                        <tr valign="top">  
                            <td valign="top">  
                                <div style="margin-top:7px; text-align: right;">  
                                    <label for='<%= RadDatePicker1.DateInput.ClientID + "_TextBox" %>'>From Date:</label> 
                                </div> 
                            </td> 
                            <td valign="top">  
                                <telerik:RadDatePicker id="RadDatePicker1" Runat="server"   
                                MinDate="2000-01-01"   
                                SharedCalendarID="sharedCalendar" Width="100px">                                                                                                          
                                <Calendar ID="Calendar1" EnableEmbeddedSkins="false" Skin="Sunny" runat="server"></Calendar> 
                                <DatePopupButton ImageUrl="images/datePickerPopup.gif"  HoverImageUrl="images/datePickerPopupHover.gif" />                                                   
                                </telerik:RadDatePicker> 
                            </td> 
 
                            <td valign="top">  
                                <div style="margin-top:7px; margin-left: 10px; text-align: right;">  
                                    <label for='<%= RadDatePicker2.DateInput.ClientID + "_TextBox" %>'>To Date:</label> 
                                </div> 
                            </td> 
                            <td valign="top">  
                                <label for="RadDatePicker2"></label> 
                                <telerik:RadDatePicker id="RadDatePicker2" Runat="server"   
                                MinDate="2000-01-01"   
                                SharedCalendarID="sharedCalendar" Width="100px">                                                      
                                <Calendar ID="Calendar2" EnableEmbeddedSkins="false" Skin="Sunny" runat="server"></Calendar> 
                                <DatePopupButton ImageUrl="images/datePickerPopup.gif" HoverImageUrl="images/datePickerPopupHover.gif" /> 
                                </telerik:RadDatePicker> 
                            </td> 
 
                        </tr>                              
                              
                    </table> 
 
 
 
<tr> 
                <td colspan="100%">  
                    <telerik:RadCalendar ID="sharedCalendar" runat="server" EnableMultiSelect="false"   
                        RangeMinDate="2000/01/01" EnableEmbeddedSkins="false" Skin="Sunny" 
                        NavigationNextImage="Images/arrowRight.gif" NavigationPrevImage="Images/arrowLeft.gif" 
                        FastNavigationPrevImage="Images/fastNavLeft.gif" FastNavigationNextImage="Images/fastNavRight.gif">  
                    </telerik:RadCalendar> 
                    <asp:PlaceHolder ID="sharedCalendarPlaceHolder" Runat="server"></asp:PlaceHolder> 
                  
                </td> 
            </tr> 
 
</table> 

Web.Config  
 
<assemblies> 
<add assembly="Telerik.Charting, Version=2.0.3.0, Culture=neutral, PublicKeyToken=D14F3DCC8E3E8763"/>  
</assemblies> 
 
<httpHandlers> 
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.723.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>  
</httpHandlers> 

###############################################################################
Nirav
Top achievements
Rank 1
 answered on 17 Dec 2009
4 answers
464 views
NOTE: Toolset Used was Q2 2009.

The following code centers the window as expected:

        var win = $find('<%= myWindow.ClientID %>');  
        if (win) {  
          if (!win.isClosed()) {  
            win.center();  
          }  
        } 

However change the size at any point and the window will not center:

        var win = $find('<%= myWindow.ClientID %>');  
        if (win) {  
          if (!win.isClosed()) {  
            win.center();  
            win.set_height(document.body.clientHeight);  
          }  
        } 

Can someone explain why this is and possibly provide a workaround. I'm resizing my window to match the browser height, but I want it maintain a centered position if they happen to expand the browsers width.

* UPDATE: Actually it doesn't seem to center only when the height is exactly the same as the internal browser height. The following codes does work (but doesn't look as nice):

        var win = $find('<%= myWindow.ClientID %>');     
        if (win) {     
          if (!win.isClosed()) {     
            win.center();     
            win.set_height(document.body.clientHeight - 2);     
          }     
        } 
Xorcist
Top achievements
Rank 1
 answered on 17 Dec 2009
2 answers
181 views
I'm working through an exercise from your Ajax Courseware. When I place a RadCalendar inside an Ajax Panel, everything works fine. The Calendar updates as expected.  When I go through the RadAjaxManager example, the calendar does not update when I click the next/prev ("<" ">") buttons, or the fast forward/back (">>" "<<") buttons. 

I'm running VS2008, .Net 3.5SP1, Win 7 64 bit, RadControls Q3 2009 NET35

Some more info: 
1) I get the same behavior if I run your sample without any changes ...\VS Projects\VS Projects\Ajax\CS\GettingStarted
2) If I disable Ajax in the AjaxManager smart tag, the calendar updates properly
3) If I click on the Month-Year heading of the calendar and select the new month/year that way, the calendar still does not update.
4) With Ajax enabled, the calendar is posting back to the server when I attempt to change the month with the < > buttons (breakpoint on Page_Load gets hit, Loading Panel on the label flashes very briefly).

Here's my markup and code-behind.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadCalendar1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <div> 
 
        <telerik:RadCalendar ID="RadCalendar1" Runat="server" AutoPostBack="True"   
            EnableMultiSelect="False" SelectedDate="" ViewSelectorText="x">  
        </telerik:RadCalendar> 
        <br /> 
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> 
 
    </div> 
    </form> 
</body> 
</html> 
 
using System;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
 
using System.Data;  
using System.Configuration;  
using System.Web.Security;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
using Telerik.Web.UI;  
 
public partial class Default : System.Web.UI.Page   
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
 
    }  
 
    protected void RadCalendar1_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e)  
    {  
        Label1.Text = RadCalendar1.SelectedDate.ToString();  
    }  
}  
 
Ken Turley
Top achievements
Rank 1
 answered on 17 Dec 2009
1 answer
635 views
Using the following code blocks below, I get a JavaScript error in Opera (and also webkit browsers):  The code works properly in Firefox 3.5 and IE8.

I'm admittedly new to Telerik (I've inherited this code), but I do know that we also are using jQuery on our site, which might be interfering?  I have attempted to replace "$telerik.$" with "$j" and "$", and it does not work.

Can anyone point me in  the right direction?  Thanks.

Here is some relevant info:
Browser: Opera 10.10  Error: Type mismatch (usually non-object value supplied where object required)
Browser: Safari 4.0.4   Error: TypeError: Result of expression '$telerik.$' [undefined] is not a function.
jQuery: 1.3.2
Telerik: 2009.3.1103.35

HTML:
<head> 
<script type="text/javascript" src="/JS/jquery/jquery-1.3.2.min.js" ></script
<script type="text/javascript"
    var $j = jQuery.noConflict();  
</script> 
<!-- irrelevant stuff here --> 
</head> 
 
<body> 
<!-- irrelevant stuff here --> 
<script src="/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_HiddenField&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-GB%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-GB%3a4552b812-caf7-4129-9b53-8f199b5bce6c%3a16e4e7cd%3aed16cbdc%3af7645509%3bAjaxControlToolkit%2c+Version%3d3.0.30930.28736%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-GB%3ab0eefc76-0092-471b-ab62-f3ddc8240d71%3adc2d6e36%3ab14bb7d5%3aa3e10fa2%3a13f47f54%3a701e375f%3a1d056c78%3a3c55b13e%3ade51bc8f%3aa4313c7a" type="text/javascript"></script> 
<!-- irrelevant stuff here --> 
</body> 
 


JavaScript:
function blah(p) 
 { 
       var i; 
        for(i=eli.length-1; i>=0; i--) 
        { 
            if (eli[i].foo == (p)) 
            { 
                $telerik.$('#' + eli[i].lid).hide();     /*  ERROR ON THIS LINE */
                $telerik.$('#' + eli[i].gid).show(); 
            } 
        } 

Sebastian
Telerik team
 answered on 17 Dec 2009
1 answer
77 views

I've just updated to the 3.1208 version and for some reason the month view isn't displaying my appointments right off the bat until I go to a new month and then come back.
I see the response returns the correct appointments but they are not displayed when they should.
Like I said I need to force the scheduler to re-request. Seems wrong. I may revert the version to see if it was a result of the update.

EDIT: I reverted to the 1103 version and I see the schedules do appear as I expect.
My resizing of the scheduler is now broken though. oi. maybe i', just stressed or something.
Yana
Telerik team
 answered on 17 Dec 2009
2 answers
125 views
Hello

I have
 <telerik:RadTextBox ID="txtBox" runat="server" EmptyMessage="Enter empty message" 
TextMode="MultiLine" Width="510px" Rows="2" /> 

In IE7, IE8 it renders with 2 rows as expected. Now in FF3.5.5 and FF3.5.6 is rendering 3 Rows ?

Is this a bug ? It seems that FF render always + 1 row then rows property.

(Telerik.Web.UI version 2009.3.1208.35)
Roland
Top achievements
Rank 1
 answered on 17 Dec 2009
1 answer
97 views
I just read the partnership news, now i am using dnn 5.1.4 due to caching problems with foreign characters. I want to present latest news via rotator at my home page.

Is there any license limitation for this kind of usage?
Lini
Telerik team
 answered on 17 Dec 2009
1 answer
104 views
What would I need to change in the Image Manager in order to get/store the images from a database instead of the file system. What would be the best approach? Should I modify the Image Manager file in EditorDialogs folder or just write a custom dialog. Pretty much I just want the user to be able to click the image button, which would prompt them to upload a file, after upload it gets stored in the database and then returns to the Editor page with the embedded image inline. How can the editor handle images coming from database instead of a normal file based <img tag -

I am sure this has been asked before but can;t find it in the forums - if you had an example that would be great. Thanks
Rumen
Telerik team
 answered on 17 Dec 2009
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?