Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
1.4K+ views
Hi, I need to perform some operations on the databound event of my RadListView however the event args do not include a data item unlike other args of the databound event, which event can I use to access the data item on databound?
Veli
Telerik team
 answered on 14 Nov 2011
1 answer
166 views
I saw the Transparent skin on the RadGrid Demo page and wanted to implement it in my project but it is not an option under the Skins list.

When I look in the Telerik Project Configuration Wizard it says that the current RadControls version is v.2011.2.915.40 and it is not included until the Default Skins or in the Skin packs.

How do I get it as an option?
James Campbell
Top achievements
Rank 1
 answered on 14 Nov 2011
8 answers
258 views
Hello.  I am trying to set up the RadCalendar to have custom mouseover tooltips on certain special days.  I have seen the example at http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultcs.aspx, but I would like to set up everything on PageLoad, rather than having the tooltips on demand.  I am unclear as to how all the various elements would fit together. 

Currently I am setting the special days as follows:
foreach (DataRow dr in dtEvents.Rows)
           {
               RadCalendarDay NewDay = new RadCalendarDay(RadEvents);
               NewDay.Date = DateTime.Parse(dr["date"].ToString());
 
               NewDay.IsSelectable = true;
               NewDay.ItemStyle.CssClass = "specialDay";
               NewDay.ToolTip = dr["title"].ToString();
               RadEvents.SpecialDays.Add(NewDay);
                
           }


Thanks in advance!

-Angie
Angie
Top achievements
Rank 1
 answered on 14 Nov 2011
1 answer
1.0K+ views
Hi,

I am new to telerik,I have implemented a calender with RadDatePicker and wanted too disable future dates.
For that in the pageload of the page I wrote this code:-

if

 

(!Page.IsPostBack)

 

{

 

this.radDatePicker1.MaxDate = DateTime.Today;

 

}

I checked it was working fine,for further testing ,I changed the system date to various dates and found that it was fine.
But after two days when I again checked,this code seemed to have no effect as all future dates are enabled.

Can anyone please let me konw how can I achieve my task?

Thanks,
Tarang
Andrey
Telerik team
 answered on 14 Nov 2011
7 answers
124 views
I've been asked to make a web version of an old VFP Windows application. The requirements include having a daily timeline with the times being the X axis and days being the y axis.
I'm attaching a screenshot of the windows application. Can I approximate this with Rad Scheduler? I don't necessarily need the whole answer, but if someone could point me in the right direction for setting this (or letting me know if it can't be done). Thanks!
Plamen
Telerik team
 answered on 14 Nov 2011
3 answers
97 views
I've been struggling with this problem for over day. While I have figured out a workaround, I wonder if anyone can explain whether there is a better way to handle it.

I have a RadGrid that is bound to a DomainDataSource. The DomainDataSource is linked to a service (LinqToEntitiesDomainService<T>) and specifically to a function in the service that returns IQueryable<Computer>, where "Computer" is an entity in our application.

In testing, I found that when the service query returned one or more "Computers", RadGrid behaves fine. However, the query function was coded (in C#) to return null when no "Computers" matched certain criteria. In this case, RadGrid did not behave as I expected. The RadGrid control would either appear as a single horizontal borderline on my page (i.e., it apparently collapses to zero height). If I set a fixed height on the control, it would then appear as an empty box.  I *thought* RadGrid was supposed to display my NoRecordsTemplate when the dataset was empty OR null. 

My workaround (discovered by accident) was to change the service function so it returns a deliberately empty query. Lo and behold, now RadGrid displays my NoRecordsTemplate exactly as intended!

What's the deal with RadGrid and a null (not empty) dataset? Is this expected behavior? If so, how did I miss that in the documentation?

I am not particularly happy about fiddling with the service function logic. I wonder if there is another workaround I can make to handle a null dataset? For instance, can I handle one of the RadGrid events and substitute an empty collection of some sort?

Thanks for any insights.

Jeff
Marin
Telerik team
 answered on 14 Nov 2011
1 answer
52 views
Telerik, 

I've got a regex control attached to a text box validating  a list of email addresses. When the set of email addresses is invalid a water mark appears in the textbox with a message 'Invalid email' displaying in black font.  It should be red font, but it looks like the radInput_error_default event is not being triggered and associated with the css that displays red font.  The css that is being used is the '.RadInputMgr_Default' with a color = black.  Below is the code for a sample application that does work.  Note the ajax toolkit script manager is being used.  

Can you shed any insight into this problem?

Peter

Not working application(abbreviated)
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Masters/FullMaster.master"
    CodeBehind="Edit.aspx.cs" Inherits="main.Prospect.Edit" Title="Edit Prospect"
    Buffer="true" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">    
    <ajax:ToolkitScriptManager runat="server" ID="ScriptManager" OnAsyncPostBackError="ScriptManagerAsyncPostBackError"
        AllowCustomErrorsRedirect="true">
    </ajax:ToolkitScriptManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server">
        <TargetControls>
            <telerik:TargetControl ControlsToApplySkin="RadGrid" Skin="Metrolist" />
        </TargetControls>
    </telerik:RadSkinManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" EnableEmbeddedSkins="false" runat="server"
        DecoratedControls="CheckBoxes" Skin="Metrolist" />
    <div id="prospectContainer">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="700px">                
            <table class="prospect">                            
                <tr class="LineTop">
                    <td class="controls">
                        <table>
                            <tr>
                                <td>
                                    <asp:TextBox ID="EmailTextbox" runat="server" Width="300px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                                                   
            </table> 
            <telerik:RadInputManager ID="RadInputManager1" runat="server" OnValidating="RadInputManagerValidating"
                EnableViewState="false"  >
                <telerik:RegExpTextBoxSetting BehaviorID="EditEmailTextBoxBehavior" IsRequiredFields="true" 
                    ValidationExpression="^([\w+-.%]+@[\w-.]+\.[A-Za-z]{2,4},? ?)+$" ErrorMessage="Incorrect email format">
                    <TargetControls>
                        <telerik:TargetInput ControlID="EmailTextbox" />
                    </TargetControls>
                    <Validation IsRequired="true" ValidationGroup="EditProspectInfoValidationGroup" ValidateOnEvent="Submit" />
                </telerik:RegExpTextBoxSetting>               
            </telerik:RadInputManager>
        </telerik:RadAjaxPanel>
    </div>   
</asp:Content>


Working application:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Test.WebForm1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<!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>


</head>
<body>
    <form id="form1" runat="server">
    <ajax:ToolkitScriptManager runat="server" ID="ScriptManager"         AllowCustomErrorsRedirect="true">
    </ajax:ToolkitScriptManager>
    <div>
        <asp:TextBox ID="EmailTextbox" runat="server" Width="300px"></asp:TextBox>
    </div>
      <%--<telerik:RadScriptManager runat="server" ID="RadScriptManager1">        
        <CdnSettings TelerikCdn="Enabled" />
        <Scripts>
            <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                Name="MicrosoftAjax.js" Path="http://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js" />
        </Scripts>
    </telerik:RadScriptManager>--%>
    <telerik:RadInputManager ID="RadInputManager1" runat="server" EnableViewState="false"  >
           <telerik:RegExpTextBoxSetting BehaviorID="EditEmailTextBoxBehavior" IsRequiredFields="true" 
                    ValidationExpression="^([\w+-.%]+@[\w-.]+\.[A-Za-z]{2,4},? ?)+$" ErrorMessage="Incorrect email format">
                    <TargetControls>
                        <telerik:TargetInput ControlID="EmailTextbox" />
                    </TargetControls>
                    <Validation IsRequired="true" ValidationGroup="EditProspectInfoValidationGroup" ValidateOnEvent="Submit" />
                </telerik:RegExpTextBoxSetting>
    </telerik:RadInputManager>
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
    </form>
</body>
</html>
Vasil
Telerik team
 answered on 14 Nov 2011
3 answers
76 views
Greetings

I'm part of a project that has up until now worked with the July release of RadControls.
I've always had issues with seeing the RadDesigner components in design view but since
I've always been part of the backend I've paid it no mind.

Now however, I installed the latest version of radcontrols (Sept SP2 release I believe)
and I need to see the components in design view to do some fixes. However, I now get
a version error due to the fact (I assume) its trying to load version "2011.2.712.40"
while I just installed version "2011.2.915.40".

Since we do like to use the latest version of the third party components we use its in the
projects best interest to migrate as soon as possible to the latest version (also for me to
do my job).

The project is TFS based as usual with normal check in policies.

How do you suggest we go about solving this issue?

Thank you for your time,

Anders
Chavdar Dimitrov
Telerik team
 answered on 14 Nov 2011
5 answers
168 views
I get this error message:

 There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.

If I do:
Select sr => it works
Select sr, s.SessionNo => it does not work

If I use Anonymous types, it doesn't work at all

Link Query:
                           Dim query = From sr In db.SessionReps
                            From s In db.Sessions Where s.ID = sr.RepID And sr.RepID = repID
                            From g In db.Groups Where g.ID = s.GroupID
                            From p In db.Programs Where p.ID = g.ProgramID
                            Select New With {.ProgramName = p.Name, .GroupName = g.Name, sr.Active, sr.Attended, sr.DropOutDate, sr.ConfirmDate, sr.SessionID, s.Name, s.SessionNo, s.StartDate, s.EndDate}

                grdSessionReps.DataSource = query.ToList()  => datasource is correct.
                grdSessionReps.DataBind()    ***** ERROR here!!!


ASCX file:

        <Columns>
            <telerik:GridBoundColumn DataField="ProgramName" HeaderText="Program Name" UniqueName="ProgramName"
                ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="GroupName" HeaderText="Group Name" UniqueName="GroupName"
                ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="Active" HeaderText="Active" ItemStyle-Width="50"
                DefaultInsertValue="true" UniqueName="Active" ReadOnly="True">
                <ItemStyle Width="50px"></ItemStyle>
            </telerik:GridCheckBoxColumn>
            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="SessionNo" HeaderText="Session No" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn DataField="StartDate" HeaderText="Start Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" UniqueName="StartDate" ReadOnly="True">
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn DataField="EndDate" HeaderText="End Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" UniqueName="EndDate" ReadOnly="True">
            </telerik:GridDateTimeColumn>
            <telerik:GridCheckBoxColumn DataField="Attended" HeaderText="Attended" ItemStyle-Width="50"
                DefaultInsertValue="true" UniqueName="Active" ReadOnly="True">
                <ItemStyle Width="50px"></ItemStyle>
            </telerik:GridCheckBoxColumn>
            <telerik:GridDateTimeColumn DataField="DropOutDate" HeaderText="DropOut Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" ReadOnly="True" UniqueName="DropOutDate">
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn DataField="ConfirmDate" HeaderText="Confirm Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" ReadOnly="True" UniqueName="ConfirmDate">
            </telerik:GridDateTimeColumn>
        </Columns>
Veli
Telerik team
 answered on 14 Nov 2011
1 answer
249 views
How do I change the max file size allowed by the image editor that is part of the RadEditor?
I tried setting ImageManager-MaxFileUploadSize attribute of the RadEditor itself.
I tried using the ImageManager inner node of the RadEditor:

<telerik:RadEditor ID="RadEditor1" Runat="server" Width="100px" Height="100px" 
EditModes="Design" EnableResize="False" EnableViewState="False" ImageManager-MaxUploadFileSize="1024000" 
ForeColor="Black" ContentAreaCssFile="~/Styles/RadEditor.css">
    <Tools>
     	...
    </Tools>
    <Content></Content>
    <MediaManager MaxUploadFileSize="10240000" />
    <ImageManager MaxUploadFileSize="10240000" />
</telerik:RadEditor>


Nothing I do seems to be working.  It always says max size is 200K.  Any ideas?
Rumen
Telerik team
 answered on 14 Nov 2011
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
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
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?