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

I am using static as well as dynamically created RadDocks. I wish to display a nice update progress spining gear in each raddock.

I wish to get the height and width of each raddock so that spinning gear will be at center of each raddcok.

<asp:UpdateProgress runat="server" ID="PageUpdateProgress" AssociatedUpdatePanelID="up_CSMD_Average_Response_Time" >
    <ProgressTemplate>
        <div id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;
            left: 35%; top: 25%; visibility: visible; vertical-align: middle;" >
            <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/loading.gif" ImageAlign="AbsMiddle" />
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
.Above code displayes it at the center of whole asp page. Can you please suggest the clilent side code to get the center of raddock and not the wholw page ?
Pero
Telerik team
 answered on 20 Apr 2011
1 answer
117 views
Can a rad label control be added to a ribbon bar group?  I have need to add some text inside a rad ribbon bar group/
Simon
Telerik team
 answered on 20 Apr 2011
4 answers
134 views
I'm programmatically creating a bar chart with 2 series. The x-axis needs to be the month but different users might have different calendar years so won't always be Jan - Dec. Not sure the best way to go about this. I had it sort of working but when there's no data for most of the months the value labels were missing or floating where they shouldn't. The x-axis was displaying correctly but the values weren't.

As I was looping through the 12 month year creating a chart item for each of the two series (current year and previous year) I was also adding a plot item like so

rcTotalsMonth.PlotArea.XAxis.Items.Add(monthItem);


where monthItem was just a string with the month abbreviation. From some other example I've seen

rcTotalsMonth.PlotArea.XAxis[0].TextBlock.Text = String.Format("{0:MMM}", tPrevDate);

but that would mean needing to tie the data to it which is what I'm not sure of.

So if someone could give me a quick example of say, an x-axis going from "Apr" to "Mar" with currency y values that would be great. Thanks.

Digital Man
Top achievements
Rank 2
 answered on 20 Apr 2011
3 answers
107 views
Hello all, 

I would like to ask you a question. In a website, usualy, you keep the same environement in the all solution.
So, when I put a <telerik:RadGrid, I would like to set default value only once in the project. Do you know if its possible ?

Like : 
<telerik:RadGrid    
 
        GridLines="None" PageSize="20" AutoGenerateColumns="false" Culture="fr-FR"
        EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowFilteringByColumn="true"
        AllowPaging="True" AllowSorting="True" ShowFooter="True"
         
    AllowAutomaticUpdates="True" AllowAutomaticDeletes="True">
 
     
    <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default" />
         
    <MasterTableView ShowGroupFooter="true" IsFilterItemExpanded="false">
 
        <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="Editer" CancelText="Annuler" UpdateText="Mettre à jour" InsertText="Ajouter" />
         
 
 
            <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" Text="Supprimer" />
        </Columns>
            <EditFormSettings>
                    <EditColumn ButtonType="ImageButton" EditText="Editer" CancelText="Annuler" UpdateText="Mettre à jour" InsertText="Ajouter" />
            </EditFormSettings>
 
    </MasterTableView>
 
</telerik:RadGrid>


Thank you very much

Jean-Yves
PageSize="20" AutoGenerateColumns="false" Culture="fr-FR"
            EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowFilteringByColumn="true"
            AllowPaging="True" AllowSorting="True" ShowFooter="True"
PageSize="20" AutoGenerateColumns="false" Culture="fr-FR"
            EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowFilteringByColumn="true"
            AllowPaging="True" AllowSorting="True" ShowFooter="True"
GridLines="None" PageSize="20" AutoGenerateColumns="false" Culture="fr-FR"
            EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowFilteringByColumn="true"
            AllowPaging="True" AllowSorting="True" ShowFooter="True"
PageSize="20" AutoGenerateColumns="false" Culture="fr-FR"
            EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowFilteringByColumn="true"
            AllowPaging="True" AllowSorting="True" ShowFooter="True"
Vasil
Telerik team
 answered on 20 Apr 2011
7 answers
169 views
Hi,
I have RadGrid with gets data from 4 different database tables using Entity Framework and LINQ with MS Framework 4.0. I have problem getting values from the EditForm controls while performing insert and Update Operations:
.aspx Mark-up:
<telerik:RadGrid ID="grdCollections" runat="server" 
            GridLines="None" AutoGenerateColumns="False"
            OnInsertCommand="grdCollections_Insert"  OnUpdateCommand="grdCollections_Update"
            OnEditCommand="grdCollections_Command" AllowSorting="True"
            OnDeleteCommand="grdCollections_Command" OnNeedDataSource="grdCollections_NeedDataSource" 
            OnCancelCommand="grdCollections_Command" OnItemDataBound="grdCollections_ItemDataBound"
            PageSize="10"
             >
    
 
    <MasterTableView  EditMode="EditForms"
                      CommandItemDisplay="Top"
                      DataKeyNames="CollectionID"
                      InsertItemDisplay="Bottom">
   
   <CommandItemSettings ShowAddNewRecordButton="true"  AddNewRecordImageUrl="~/Images/AddRecord.gif"
                    AddNewRecordText="Add New Collection Entry"  >
    </CommandItemSettings>
 
  
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="CollectionID"
            DataType="System.Int32"  ReadOnly="true"
            FilterControlAltText="Filter CollectionID column" HeaderText="ID"
            SortExpression="CollectionID" UniqueName="CollectionID">
        </telerik:GridBoundColumn>
        
       <telerik:GridDropDownColumn FilterControlAltText="Filter CreditorID column"
            UniqueName="CreditorID" DataField="CreditorID" HeaderText="*CreditorID"
            Visible="true" >
        </telerik:GridDropDownColumn>
 
       <telerik:GridDropDownColumn FilterControlAltText="Filter Name column"
            UniqueName="Name" DataField="Name" HeaderText="*Agency Name"
            ListTextField="Name" ListValueField="CreditorID">
       </telerik:GridDropDownColumn>
 
        <telerik:GridBoundColumn DataField="AccountNumber"
            FilterControlAltText="Filter AccountNumber column" HeaderText="Account No."
            SortExpression="AccountNumber" UniqueName="AccountNumber">
        </telerik:GridBoundColumn>
        
        <telerik:GridDateTimeColumn FilterControlAltText="Filter RptdDate column"
            DataField="RptdDate" DataType="System.DateTime" HeaderText="*Opened Date"
            SortExpression="RptdDate" UniqueName="RptdDate" DataFormatString="{0:d}">
        </telerik:GridDateTimeColumn>
        
        <telerik:GridDateTimeColumn DataField="RvsdDate" DataType="System.DateTime"
            FilterControlAltText="Filter RvsdDate column" HeaderText="Date Revised"
            SortExpression="RvsdDate" UniqueName="RvsdDate" DataFormatString="{0:d}">
        </telerik:GridDateTimeColumn>
        <telerik:GridDateTimeColumn DataField="LastPmtDate" DataType="System.DateTime"
            FilterControlAltText="Filter LastPmtDate column" HeaderText="Last Payment Date"
            SortExpression="LastPmtDate" UniqueName="LastPmtDate" DataFormatString="{0:d}">
        </telerik:GridDateTimeColumn>
 
        <telerik:GridNumericColumn DataField="Amount" DataType="System.Decimal"
            FilterControlAltText="Filter Amount column" HeaderText="Amount"
            SortExpression="Amount" UniqueName="Amount" DataFormatString="{0:C}">
        </telerik:GridNumericColumn>
 
        <telerik:GridNumericColumn DataField="Balance" DataType="System.Decimal"
            FilterControlAltText="Filter Balance column" HeaderText="Total Balance" DataFormatString="{0:C}"
            SortExpression="Balance" UniqueName="Balance">
        </telerik:GridNumericColumn>
 
        <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column">
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn CommandName="Delete"
            FilterControlAltText="Filter column1 column" Text="Delete" UniqueName="column1">
        </telerik:GridButtonColumn>
    </Columns>
 
    <EditFormSettings EditFormType="Template">
        <EditColumn UniqueName="EditCommandColumn1">
        </EditColumn>
        <FormTemplate>
            <table width="580px">
            <tr>
                <td style="width:19%; text-align:right;">
                    <asp:Label ID="lblEditAgency" runat="server" Text="*Agency:"></asp:Label>
                </td>
                <td style="width:1%;"
                </td>
                <td style="width:80%;">
                        <telerik:RadComboBox ID="cmbCreditors" runat="server" 
                            DataTextField="Name" DataValueField="CreditorID"
                            DropDownWidth="440px" Height="150px"
                            EmptyMessage="Select the name of the collection agency. If the agency is not on the list, click Add New">
                            <HeaderTemplate>
                                <table style="width: 440px" cellspacing="0" cellpadding="0">
                                    <tr>
                                    <td style="width:30px">ID
                                    </td>
                                    <td style="width:120px">Agency Name
                                    </td>
                                    <td style="width:140px">Address
                                    </td>
                                    <td style="width:75px">Phone
                                    </td>
                                    <td style="width:75px">Fax
                                    </td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table  style="width: 440px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width:30px"><%# DataBinder.Eval(Container.DataItem, "CreditorID")%>
                                        </td>
                                        <td style="width:120px"><%# DataBinder.Eval(Container.DataItem, "Name")%>
                                        </td>
                                        <td style="width:140px"><%# DataBinder.Eval(Container.DataItem, "Address")%>
                                        </td>
                                        <td style="width:75px"><%# DataBinder.Eval(Container.DataItem, "Phone")%>
                                        </td>
                                        <td style="width:75px"><%# DataBinder.Eval(Container.DataItem, "Fax")%>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </telerik:RadComboBox>
                            
                        <asp:Button ID="Button3" Text="Add Agency" runat="server" OnClientClick="radbtnAddAgency(); return false;">
                        </asp:Button>
 
                </td>
            </tr>
 
            <tr>
                <td  style="text-align:right;">
                    <asp:Label ID="Label2" runat="server" Text="*Opened Date:"></asp:Label>
                </td>
                <td
                </td>
                <td>
                <telerik:RadDatePicker ID="DtPickerOpenedDate" runat="server">
                </telerik:RadDatePicker>
                </td>
            </tr>
            <tr>
                <td  style="text-align:right;">
                <asp:Label ID="Label1" runat="server" Text="*Revised Date:"></asp:Label>
                </td>
                <td
                </td>
                <td>
                <telerik:RadDatePicker ID="DtPickerRevisedDate" runat="server">
                </telerik:RadDatePicker>
                </td>
            </tr>
            <tr>
                <td  style="text-align:right;">
                <asp:Label ID="Label4" runat="server" Text="Account Number:"></asp:Label>
                </td>
                <td
                </td>
                <td>
                <telerik:RadTextBox ID="txtAccNumber" runat="server" Width="200px" EmptyMessage="Enter the internal account number if applicable">
                </telerik:RadTextBox>
                </td>
            </tr>
            <tr>
                <td  style="text-align:right;">
                <asp:Label ID="Label5" runat="server" Text="Last Payment Date:"></asp:Label>
                </td>
                <td
                </td>
                <td>
                <telerik:RadDatePicker ID="DtPickerLastPaymentDate" runat="server">
                </telerik:RadDatePicker>
                </td>
            </tr>
            <tr>
                <td  style="text-align:right;">
                <asp:Label ID="Label6" runat="server" Text="Debt Amount:"></asp:Label>
                </td>
                <td
                </td>
                <td>
                <telerik:RadNumericTextBox ID="txtDebtAmount" runat="server" Width="70px" Type="Currency"  EmptyMessage="Click here to enter amount">
                </telerik:RadNumericTextBox>
                </td>
            </tr>
            <tr>
                <td  style="text-align:right;">
                <asp:Label ID="Label7" runat="server" Text="Total Balance:"></asp:Label>
                </td>
                <td
                </td>
                <td>
                <telerik:RadNumericTextBox ID="txtTotalBalance" runat="server" Width="70px" Type="Currency"  EmptyMessage="Click here to enter amount">
                </telerik:RadNumericTextBox>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                <asp:Button ID="btnSave" Text='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Insert" : "Update" %>'
                        runat="server" CommandName='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'>
                </asp:Button>  
                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                </asp:Button>
                </td>
            </tr>
            </table>
        </FormTemplate>
    </EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 <ClientSettings>
        <ClientEvents OnCommand="RaiseCommand" />
    </ClientSettings>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>

Code behind:
protected void grdCollections_Insert(object sender, GridCommandEventArgs e)
        {
 
            
 
            GridEditFormInsertItem insItem = e.Item as GridEditFormInsertItem;
            //GridEditableItem  editItem = e.Item.OwnerTableView.GetInsertItem();
 
            int AgentId = 0;
            RadComboBox cmb = insItem.FindControl("cmbCreditors") as RadComboBox;
//cmb shows null
            if ((cmb != null) && (cmb.DataSource != null))
            {
                AgentId = Convert.ToInt32(cmb.SelectedValue);
 
            }
//txtAmt  shows null         
RadTextBox txtAmt = insItem.FindControl("txtDebtAmount") as RadTextBox;
}
 
 protected void grdCollections_Update(object sender, GridCommandEventArgs e)
        {
 
            GridEditableItem editedItem = e.Item as GridEditableItem;
 
            int AgentId = 0;
            RadComboBox cmb = editedItem.FindControl("cmbCreditors") as RadComboBox;
//cmb shows null 
            if ((cmb != null) && (cmb.DataSource != null))
            {
                AgentId = Convert.ToInt32(cmb.SelectedValue);
 
            }
//txtAmt  shows null 
            RadTextBox txtAmt = editedItem.FindControl("txtDebtAmount") as RadTextBox;
 
        }

Can you please tell me whats am I doing wrong here ?

Thanks

Tejas
Tejas
Top achievements
Rank 1
 answered on 20 Apr 2011
3 answers
185 views
When I add the bulleted list button to the ascx page the button will not show up.  I even added an existing button thinking this version did not support the bulleted button but this did not work.  

 

 

 

<div id="editor" class="input"
    <telerik:RadEditor ID="txtText" runat="server" Height="200px" Width="400px" ToolTip="Enter a body" EnableEmbeddedSkins="false"
        <Tools
            <telerik:EditorToolGroup
                <telerik:EditorTool Name="Bold" /> 
                <telerik:EditorTool Name="Italic" /> 
                <telerik:EditorTool Name="Underline" /> 
                <telerik:EditorTool Name="Cut" /> 
                <telerik:EditorTool Name="Copy" /> 
                <telerik:EditorTool Name="Paste" /> 
                <telerik:EditorTool Name="FontName" /> 
                <telerik:EditorTool Name="FontSize" /> 
                <telerik:EditorTool Name="ForeColor" /> 
                <telerik:EditorTool Name="InsertUnorderedList" /> 
                <telerik:EditorTool Name="Bold" /> 
            </telerik:EditorToolGroup
        </Tools
        <Content
        </Content
    </telerik:RadEditor
</div

 

 

 

 

 

 

 

 


But when I add it in code, it does show up, why? 
if (!IsPostBack)
 {
       EditorToolGroup main = new EditorToolGroup();
       txtText.Tools.Add(main);
       EditorTool InsertUnorderedList = new EditorTool();
       InsertUnorderedList.Name = "InsertUnorderedList";
       main.Tools.Add(InsertUnorderedList);
}

 

 

We want to be able to add it in the ascx markup.

 

 

 

Rumen
Telerik team
 answered on 20 Apr 2011
1 answer
98 views
When i apply any name property to the controls, it doesn't set to the controls..
So that i cant work with radio button efficiently...
give me some solution pls....
Rumen
Telerik team
 answered on 20 Apr 2011
1 answer
116 views

I have 5 tabs and each one load a web user control. I used RadTabStrip and RadMultiPage controls. my problem is that RadAjaxLoadingPanel  only works in the first click but when I click for second time in any tab, this does not work. How can I show the loading image each time the user clicks a tab and needs to wait for being loading the user control?

<%

--<telerik:RadScriptManager ID="ScriptManager1" runat="server" />--%>

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="rtsBooks">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="rmpTreeviews" LoadingPanelID="ralpnlProgress"/>

 

 

 

<telerik:AjaxUpdatedControl ControlID="rtsBooks" LoadingPanelID="ralpnlProgress"/>

 

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="rmpTreeviews">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="rmpTreeviews" LoadingPanelID="ralpnlProgress"/>

 

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<

 

telerik:RadAjaxLoadingPanel ID="ralpnlProgress" runat="server" Transparency="20">

 

 

<img alt="Loading..." src="/_layouts/NIAMS.UCTreeview/Images/loading.gif"/>

 

 

</

 

telerik:RadAjaxLoadingPanel>

 

 

<%

--OnTabClick="RadTabStrip1_TabClick" --%>

 

 

 

 

 

<telerik:RadTabStrip ID="rtsBooks" runat="server" Skin="" OnTabClick="rtsBooks_TabClick"

 

 

 

MultiPageID="rmpTreeviews" Width="100%" Height="25" >

 

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/HomeButton.png">

 

 

</telerik:RadTab>

 

 

 

 

 

<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/WhiteButton.png">

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/RedButton.png">

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/BlueButton.png">

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/YellowButton.png">

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" ImageUrl="~/_layouts/NIAMS.UCTreeview/Images/GreenButton.png">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</

 

telerik:RadTabStrip>

 

 

<

 

div id="rightMenu" style="text-align: right; width: 950px;">

 

 

<div><asp:HyperLink ID="lnkPrint" Width="900" runat="server" NavigateUrl="~/projects/bb/WebPartPage/FullTableOfContentsBB.aspx" Target="_blank">Preview Full E-Briefing Book Table of Contents</asp:HyperLink></div>

 

 

</

 

div>

 

 

<telerik:RadMultiPage ID="rmpTreeviews" runat="server" SelectedIndex="0" CssClass="multiPage" RenderSelectedPageOnly="True">

 

 

<telerik:RadPageView ID="rdvHome" runat="server" width="980px">

 

 

<div class="HomeBoxHeader"></div>

 

 

<div style="padding-left:20px;">

 

 

<uc2:UCHome ID="UCHome1" runat="server" />

 

 

</div>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="rpvWhite" runat="server" width="998px">

 

 

<div class="WhiteBoxHeader"></div>

 

 

<asp:PlaceHolder ID="phWhite" runat="server"></asp:PlaceHolder>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="rpvRed" runat="server" width="998px">

 

 

<div class="RedBoxHeader"></div>

 

 

<asp:PlaceHolder ID="phRed" runat="server"></asp:PlaceHolder>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="rpvBlue" runat="server" width="998px">

 

 

<div class="BlueBoxHeader"></div>

 

 

<asp:PlaceHolder ID="phBlue" runat="server"></asp:PlaceHolder>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="rpvYellow" runat="server" width="998px">

 

 

<div class="YellowBoxHeader"></div>

 

 

<asp:PlaceHolder ID="phYellow" runat="server"></asp:PlaceHolder>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="rpvGreen" runat="server" width="998px">

 

 

<div class="GreenBoxHeader"></div>

 

 

<asp:PlaceHolder ID="phGreen" runat="server"></asp:PlaceHolder>

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage>

 

 

 

 

<telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="Textarea" />

 

Maria Ilieva
Telerik team
 answered on 20 Apr 2011
2 answers
116 views
I have a RadComboBox that looks fine as long as the text for the items is not wider than the width of the combobox control.  If the text overflows though, not only does a horizontal scrollbar appear on the control (which is okay), but the dropdown is shortened to a single line long so that choosing an item requires extensive scrolling.  Is there some way to prevent this behavior so the height of the control is not wrong in this situation?

Thanks!
Shira
Top achievements
Rank 1
 answered on 20 Apr 2011
15 answers
139 views
Just wondering if there is a fix for Coverflow for the Rotator in IE9.
It was working fine in my website before in IE8 and Firefox, but now with IE9 it stuffs up as in attached images.

Ideas?  I've got the latest release of Telerik tools.

The demo site for the Rotator appears fine within IE9 too.

code below.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestRotator.aspx.cs" Inherits="TestRotator" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Coverflow" Width="500px"
            OnClientItemShown="" Skin="Vista">
            <ItemTemplate>
                <asp:Image ID="Image1" runat="server" Height="100px" Width="200px" ImageUrl='<%# Container.DataItem %>'
                    AlternateText="<%# VirtualPathUtility.GetFileName(Container.DataItem.ToString()) %>"
                    BorderStyle="Solid" BorderWidth="4px" BorderColor="Black" />
            </ItemTemplate>
        </telerik:RadRotator>
    </div>
    </form>
</body>
</html>

protected void Page_Load(object sender, EventArgs e)
    {
        RadRotator1.RotatorType = Telerik.Web.UI.RotatorType.CoverFlow;
        RadRotator1.DataSource = GetFilesInFolder("~/Images/HomeRotator");
        RadRotator1.DataBind();
    }
  
    protected List<string> GetFilesInFolder(string folderVirtualPath)
    {
        string physicalPathToFolder = Server.MapPath(folderVirtualPath);// Get the physical path
        string[] physicalPathsCollection = System.IO.Directory.GetFiles(physicalPathToFolder);// Get all child files of the given folder
        List<string> virtualPathsCollection = new List<string>();// Contains the result
  
        foreach (String path in physicalPathsCollection)
        {
            // The value of virtualPath will be similar to '~/PathToFolder/Image1.jpg
            string virtualPath = VirtualPathUtility.AppendTrailingSlash(folderVirtualPath) + System.IO.Path.GetFileName(path);
            virtualPathsCollection.Add(virtualPath);
        }
        return virtualPathsCollection;
    }
Niko
Telerik team
 answered on 20 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?