Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hello,

I just wanted to know whether its possible to refer an Image control present inside the AppointmentTemplate from the AppointmentDataBound event?? say  FindControl or something.

I need to show and hide icons for appointments based on some conditions.

Any assistance will be highly appreciated.
Princy
Top achievements
Rank 2
 answered on 28 Jan 2011
3 answers
258 views
HI,

I am using RadTabstrip in my application,inside RadTabstrip i am having tabs,my requirement is to have space between the tabs with round corners and i need to change the color of the selected  tab etc...Please find the attached image for reference
Yana
Telerik team
 answered on 28 Jan 2011
1 answer
119 views
Hello,

What are all of the acceptable date formats by the control?  Is it all month, day, and year type formats?  So far, we've figured this all works:

mm.dd.yyyy
mm-dd-yyyy
month day yyyy
month day yyyy
month day, yyyy
mmddyyyy
mm,dd,yyyy

Is there any else?  Does it support entering the day of the year with the year, such as 176/2010 or something like that?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 28 Jan 2011
1 answer
1.2K+ views
Is there any way we can avoid the grid from showing horizontal scroll but only vertical scroll the code i am using is 

Thanks
Roshin
 
<telerik:RadGrid ID="gvDetail" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    GridLines="None" OnItemCommand="gvDetail_ItemCommand" OnNeedDataSource="gvDetail_NeedDataSource"
                    Width="100%">
                    <ClientSettings>
                        <Scrolling AllowScroll="True" />
                    </ClientSettings>
                    <MasterTableView AutoGenerateColumns="false" DataKeyNames="SNo,RegRegion,CCCName,Address,ContactDetails,Benefits">
                        <NoRecordsTemplate>
                            No data available</NoRecordsTemplate>
                        <Columns>
                            <telerik:GridBoundColumn DataField="SNo" HeaderText="Serial Number" />
                            <telerik:GridBoundColumn DataField="RegRegion" HeaderText="Location" />
                            <telerik:GridBoundColumn DataField="CCCName" HeaderText="Child Care Centre Name" />
                            <telerik:GridBoundColumn DataField="Address" HeaderText="Address" />
                            <telerik:GridBoundColumn DataField="ContactDetails" HeaderText="URL & Contact Details" />
                            <telerik:GridBoundColumn DataField="Benefits" HeaderText="Benefits" />
                            <telerik:GridTemplateColumn HeaderText="Edit" UniqueName="TemplateColumn">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="false" CommandName="ViewSelected"
                                        Text="Edit"></asp:LinkButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Delete" UniqueName="TemplateColumnDel">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="false" CommandName="Delete"
                                        OnClientClick="return confirm('Are you certain you want to delete?');" Text="Delete">
                                    </asp:LinkButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>




Shinu
Top achievements
Rank 2
 answered on 28 Jan 2011
1 answer
54 views
Hello there

I'm working on a RadEditor stylesheet at the moment, but unsurprisingly, I'm having trouble getting together an appearance that looks acceptable in both Internet Explorer and other browsers. Normally, I would use conditional [if IE] statements in the <head> section of a page. However, I don't think this approach is valid for styling the content of the iframe that the RadEditor uses - am I right in thinking that the markup for the control would not allow any such conditional loading of stylesheets through its <CssFiles> node. If not, the obvious answer is to apply CSS  hacks within a single stylesheet, but I try and avoid this whereever possible as usually it just stores up trouble for later, e.g., IE8 parses CSS hacks differently to other versions.
I'm wondering if anybody has suggestions about the best way of approaching this issue for RadEditor styling.

Thanks very much

Regards
  
Rumen
Telerik team
 answered on 28 Jan 2011
1 answer
69 views
Hi,
I found a forgotten localization in the file "RadEditor.Dialogs.fr-FR.resx" in the RadControls for ASP.NET AJAX Q2 2010.
At line [ImageEditor_Save] the value was "Save" instead of "Enregistrer".

That's all, great work anyway.
Rumen
Telerik team
 answered on 28 Jan 2011
10 answers
1.2K+ views
Before upgrading to ASP.NET AJAX  from ASP.NET the rad grid grouping worked. Since upgrading however, as soon as a drag and drop grouping is preformed we are greeted with this error:

Unable to cast object of type 'Telerik.Web.UI.RadGrid' to type 'Telerik.Web.UI.GridTableView'.

I created a test page where I bound test data to a newly add rad grid and enabled grouping and it still blows up. 

I tried looking through the examples, but they either leave much to be desired or I followed them correctly and something is still not quiet right. Any ideas?

Thenmozhi
Top achievements
Rank 1
 answered on 28 Jan 2011
1 answer
312 views
Dear Telerik Team,

First, I would like to point out that the support job you do all over the year is great, and I think that plenty of developpers are really thankfull but don't say it (enough). Your job is really helpfull for us poor developpers trying to use your controls.

This said, let's process my problem :)

I have something really similar to the following code. I would like to change the title of the RadWindow "FollowUpDialog" from FollowUp.aspx. I would like to do this depeding on a server-side checked condition.

Software.aspx
<%@ Page Language="C#" MasterPageFile="~/Pages/Master/MasterPage.master" AutoEventWireup="true"
    CodeFile="Software.aspx.cs" Inherits="Pages_Projects_Software" Title="Software" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadScriptBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
         
            function ShowFolloUpForm(id) {
                window.radopen("FollowUp.aspx?IdProject=" + id, "FollowUpDialog");
                return false;
            }
  
        </script>
    </telerik:RadScriptBlock>
    <telerik:RadAjaxManager ID="RessourceManager" runat="server" OnAjaxRequest="RessourceManager_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RessourceManager">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridSoftware" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridSoftware">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridSoftware" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadWindowManager ID="RadWindowManagerSoftware" runat="server" EnableEmbeddedSkins="false">
        <Windows>
            <telerik:RadWindow ID="EditSoftware" runat="server" Title="" Height="500px" Width="650px"
                Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false" Behaviors="None"
                Modal="true" VisibleStatusbar="false" />
        <telerik:RadWindow ID="FollowUpDialog" runat="server" Title="THIS IS A BAD TITLE"
                Height="300px" Width="500px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                Behaviors="None" Modal="true" VisibleStatusbar="false" />
        </Windows>
    </telerik:RadWindowManager>
    <fieldset>
        <legend>Liste des Softwares</legend>
         
        <telerik:RadGrid ID="RadGridSoftware" runat="server" AutoGenerateColumns="False"
            DataSourceID="SqlDataSourceSoftware" GridLines="None" ShowFooter="True" AllowSorting="True"
            EnableLinqExpressions="False" OnItemCreated="RadGridSoftware_ItemCreated" OnItemCommand="RadGridSoftware_ItemCommand"
            EnableEmbeddedSkins="false">
            <MasterTableView DataKeyNames="IdSoftware" DataSourceID="SqlDataSourceSoftware"
                ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" NoMasterRecordsText="Pas de Software"
                HierarchyLoadMode="ServerOnDemand" CommandItemDisplay="Top" Name="Master">
                <CommandItemTemplate>
                    <a href="#" onclick="return ShowSoftwareInsertForm();">
                        <img alt="add" src="../../Images/add.gif" />Ajouter un Software</a>
                </CommandItemTemplate>
                [... NestedViewTemplate with another RadGrid on it but it's not important ...]
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                <telerik:GridTemplateColumn UniqueName="pTemplateFollowUpColumn">
                  <ItemStyle Width="20px" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="btnFollowUp" CssClass="cmdCursor" runat="server" ImageUrl="~/Images/note_accept.gif"
                                                AlternateText='Follow Up / View Follow Up'
                                                Text="Follow Up" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </fieldset>
    <asp:SqlDataSource ID="SqlDataSourceSoftware" runat="server" ConnectionString="..."
        SelectCommand="LIST_Software" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" EnableEmbeddedSkins="false">
    </telerik:RadAjaxLoadingPanel>
</asp:Content>

Software.aspx.cs
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
public partial class Pages_Projects_Software : Page
{
    #region Private et Public Properties, Enum et Constantes
 
    /// <summary>
    /// Gets or sets the id Project.
    /// </summary>
    /// <value>The id Project.</value>
    protected Int32 IdProject { get; set; }
   
    #endregion 

    #region Cycle de vie et Evenements 
 
    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void Page_Load(object sender, EventArgs e)
    {

    } 
 
    /// <summary>
    /// Handles the ItemDataBound event of the RadGridProjectNested control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="Telerik.Web.UI.GridItemEventArgs"/> instance containing the event data.</param>
    protected void RadGridProjectNested_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem) e.Item;
            IdProject = (int)item.OwnerTableView.DataKeyValues[item.ItemIndex]["IdProject"];
            ImageButton FollowUp = (ImageButton)item.FindControl("btnFollowUp");
            FollowUp.Attributes["onclick"] = String.Format("return ShowFollowUpForm('{0}');", IdProject);
            [...]
        }
    }
    #endregion 
}

FollowUp.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Master/MasterPage2.master"
    AutoEventWireup="true" CodeFile="FollowUp.aspx.cs" Inherits="Pages_Projects_FollowUp" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
        <script type="text/javascript">
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow;
                else if (window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow;
                return oWindow;
            }
 
            function CloseWindow() {
                GetRadWindow().Close();
            }
 
        </script>
 
    </telerik:RadCodeBlock>
    <p>POC</p>
    <asp:Button ID="btnClose runat="server" Text="Close the window" OnClientClick="CloseWindow();" />
</asp:Content>

FollowUp.aspx.cs
using System;
using System.Linq;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
/// <summary>
///
/// </summary>
public partial class Pages_Projects_FollowUp : System.Web.UI.Page
{
 
 
    #region Cycle de vie et Evenements
 
        /// <summary>
        /// Déclenche l'événement <see cref="E:System.Web.UI.Control.Init"/> pour initialiser la page.
        /// </summary>
        /// <param name="e"><see cref="T:System.EventArgs"/> qui contient les données d'événement.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
 
            // >>> Let's change the RadWindow title. In my exemple, I check if there is a QueryString particular value. If it's true, then I change the RadWindow Title.
            // FollowUpDialog.Title = "This is a good title";
 
        }
 
 
    #endregion
     
}
Sébastien
Top achievements
Rank 2
 answered on 28 Jan 2011
1 answer
98 views
Hi all!

I found a strange behavior here in IE (Works fine with Chrome). When putting a table inside a LinkButton, the row selection doesn't work inside the table("inside table"), but clicking outside the table works ("outside table")..

Code in ItemTemplate:
<asp:LinkButton ID="LinkButton3" D="SelectButton" runat="server" CommandName="Select" CausesValidation="False">
    outside table
    <table>
        <tr>
            <td>inside</td>
            <td>table </td>
        </tr>
    </table>
</asp:LinkButton>
Does anybody have a solution or a workaround?

Thanks!
Greetings, Matthias

Radoslav
Telerik team
 answered on 28 Jan 2011
1 answer
115 views
I have a grid with an edit form that has a radpanelbar implemented.  When I go into edit mode, I am trying to set the data in a textbox to its proper value.

Here is the code I am using (found this while searching):

 

 

protected void EmpGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
  
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
   {
     
GridEditFormItem gditem = e.Item as GridEditFormItem;
     
RadPanelBar RadPanelBar1 = gditem.FindControl("RadPanelBar1") as RadPanelBar;
     
RadPanelItem panelItem1 = (RadPanelItem)RadPanelBar1.FindItemByText("Forwarding Info");
     
TextBox txtForwardCompany = panelItem1.FindControl("txtForwardCompany") as TextBox;
      txtForwardCompany.Text = (gditem.DataItem
as DataRowView)["EmpForwardCompany"].ToString();
  
}
}

 

The problem is that (gditem.DataItem as DataRowView) returns null.  The gditem.DataItem object is populated, it apparently can't be cast to a DataRowView.  Any thoughts on what I'm doing wrong here?

Thanks in advance

Iana Tsolova
Telerik team
 answered on 28 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?