Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
278 views
Hey everyone,

I was trying to use the RadRotator as a slideshow device.  It was going good, but I have a lot of trouble making the images line up 1 per "screen" if you will.  If I let it run as a "slideshow" without any buttons showing from the control for awhile, the images gradually get offset by 1-2 px which slowly builds up until 20-30px offset is appearing in each picture.  That is, i see 80% of 1 pic, 20 % of the next (or previous).  It appears as if there is a slight offset, maybe a double-> int loss of precision that is affecting layout.... has anyone encountered this before?   I find if I have the tool buttons visible, this error does not occur, but then the user has to click to move the images, which seems counter-productive to a "slide-show".  My sample is below... note that I have tweaked the width/height of my Rotator, the Item width/height and the actual width/height of the table that the rotator template uses and the offset issue always seems to occurr.

Any input is appreciated.

Thx,
Rob



Sample of my rotator:

    <telerik:RadRotator ID="SlideshowRotator" runat="server"
                FrameDuration="3000" Skin="Web20" RotatorType="SlideShowButtons"
                Width="520" Height="358" ItemWidth="480" ItemHeight="358"
                ScrollDirection="Left,Right">
                        <ItemTemplate>
                        <table style="width:480px; height:356px; margin-bottom:2px;">
                                 <tr><td valign="middle" align="center"><img src='<%# DataBinder.Eval(Container.DataItem, "ImageUrl") %>' alt='<%# DataBinder.Eval(Container.DataItem, "Title")%>'
                                    style='width:<%# DataBinder.Eval(Container.DataItem, "SlideshowWidth") %>px; height:<%# DataBinder.Eval(Container.DataItem, "SlideshowHeight") %>px;' /></td></tr>
                        </table>
                        </ItemTemplate>
                    </telerik:RadRotator>
Marin Bratanov
Telerik team
 answered on 13 Apr 2011
2 answers
119 views
How can make RadTicker to stop ticking ?  I have hooked it to the timer I already have which is for 15 mins. I want RadTicker to start every 15 mins and stop after 5 mins. How can I do that ?

Please help,
Smiely
Niko
Telerik team
 answered on 13 Apr 2011
1 answer
83 views
Hi, 
    I am having a problem in either editing or inserting data into any controls in the RadWindow. Sometimes it will not allow me to do it at all and sometimes if I hold down the left mouse button while the cursor is hovered over the control and type at the same time I can then edit or insert data. In my codesnippet you can see I am dynamically loading a usercontrol to the PopupPage.aspx but in testing I added the server controls directly to the PopupPage.aspx, thinking that maybe it was the usercontrol causing the issue. But still the same issue persisted, can someone please help me?

Codesnippet:

Default.aspx:
  <asp:ImageButton ID="imgAdd" runat="server" OnClientClick="return ShowRadWindowInsertForm('Edit')"  Visible="true" ToolTip="Add User" ImageUrl="~/Common/Images/add.png" />
<telerik:RadGrid ID="radGrid1" runat="server" AllowPaging="True" AllowSorting="True"
    GridLines="None" AutoGenerateColumns="false" OnNeedDataSource="radGrid1_NeedDataSource" OnPageIndexChanged=" radGrid1_PageIndexChanged" OnSortCommand=" radGrid1_SortCommand" OnItemCommand=" radGrid1_ItemCommand" OnItemDataBound=" radGrid1_ItemDataBound">
    <MasterTableView DataKeyNames="Id">
        <RowIndicatorColumn Visible="False">
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn Resizable="False" Visible="False">
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
        <EditFormSettings>
            <PopUpSettings ScrollBars="None" />
        </EditFormSettings>
        <Columns>
            <telerik:GridTemplateColumn SortExpression="FirstName" HeaderText="Full Name" HeaderButtonType="TextButton"
                UniqueName="FullName">
                <ItemTemplate>
                    <%# Eval("FirstName") + " " + Eval("MiddleInitial") + " " + Eval("LastName") + " " + Eval("Suffix")%>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn SortExpression="BirthDate" HeaderText="Birth Date" HeaderButtonType="TextButton"
                HeaderStyle-Width="75px" DataField="BirthDate" UniqueName="BirthDate" DataFormatString="{0:MM/dd/yyyy}">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="User Information" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    (H): <%# Custom.Converters.ToString(Custom.Converters.ToString(Eval("HomePhone")).PhoneFormat(Custom.PhoneFormat.DASHES))%><br />
                    (C): <%# Custom.Converters.ToString(Custom.Converters.ToString(Eval("CellPhone")).PhoneFormat(Custom.PhoneFormat.DASHES))%><br />
                    Email: <%# Eval("Email")%>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn SortExpression="AddDate" HeaderText="Date Added" HeaderButtonType="TextButton"
                HeaderStyle-Width="75px" DataField="AddDate" UniqueName="AddDate" DataFormatString="{0:MM/dd/yyyy}">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Action" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:ImageButton ID="imgEdit" runat="server" ImageUrl="~/Common/Images/pencil.png" CausesValidation="false"
                         />   
                    <asp:ImageButton ID="ibDelete" runat="server" CommandName="Delete" ImageUrl="~/Common/Images/cross.png"
                        CommandArgument='<%#Eval("Id") %>' CausesValidation="false" OnClientClick="return confirm('Are you sure that you want to delete user?');" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
  
<telerik:RadWindowManager ID="radWinMng1" runat="server" EnableShadow="true" >
    <Windows>
        <telerik:RadWindow ID="PopupDialog" Behaviors="Close" runat="server" Title="Editing Record" 
            ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" />
    </Windows>
</telerik:RadWindowManager>
  
Default.aspx.cs:
 protected void radGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            //Is it a GridDataItem
            if (e.Item is GridDataItem)
            {
  
                ImageButton editLink = (ImageButton)e.Item.FindControl("imgEdit");
                editLink.OnClientClick = String.Format("return ShowRadWindowEditForm ('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][" Id"], "Edit");
            }
        }
  
  
Common.js:
function ShowRadWindowEditForm (id, clt ) {
    window.radopen("PopupPage.aspx?id=" + id + "&clt=" + clt , clt + "PopupDialog");
    return false;
}
  
function ShowRadWindowInsertForm(clt) {
    window.radopen("PopupPage.aspx?id=0&clt=" + clt, clt + "PopupDialog");
    return false;
}
  
  
PopupPage.aspx:
<form id="form1" runat="server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
     <asp:PlaceHolder ID="plControl" runat="server" />
    </form>
PopupPage.aspx.cs:
 protected override void OnInit(EventArgs e)
        {
            //PopupPage.aspx?id=1&clt=AcctAdditionalAuthorizedUserEdit
            LoadUserControl(Request.QueryString["clt"]);
            base.OnInit(e);
        }
  
 protected void Page_Load(object sender, EventArgs e)
        {
            switch (Request.QueryString["clt"])
            {
                case "Edit":
                    Edit ThisCtrl = (Edit)plControl.Controls[0];
                    ThisCtrl.UserId = Common.Converters.ToInt32(Request.QueryString["id"]);
                    break;
            }
        }
  
  
private void LoadUserControl(string controlName)
        {
            string Vpath = string.Format("Controls/{0}.ascx", controlName);
            if (File.Exists(Server.MapPath(Vpath)))
            {
                plControl.Controls.Add(LoadControl(Vpath));
            }
        }
  
Edit.ascx:
<fieldset>
    <legend>Edit Data</legend>
    <table style="width: 100%"
        <tr>
            <td style="width:300px; vertical-align: top;">
                <div>
                    <div class="EditFormLeft REQ">
                        First Name:</div>
                    <div class="EditFormRight">
                        <asp:TextBox ID="txtFirstName" runat="server" TabIndex="6"></asp:TextBox>
                    </div>
                    <div class="Clear">
                    </div>
                    <div class="EditFormLeft">
                        Middle Initial:</div>
                    <div class="EditFormRight">
                        <asp:TextBox ID="txtMiddle" runat="server" Width="20" MaxLength="1" TabIndex="7"></asp:TextBox>
                    </div>
                    <div class="Clear">
                    </div>
                    <div class="EditFormLeft REQ">
                        Last Name:</div>
                    <div class="EditFormRight">
                        <asp:TextBox ID="txtLastName" runat="server" TabIndex="8"></asp:TextBox>
                         <input type="text" name="last-name" id="lastName" />
                    </div>
                    <div class="Clear">
                    </div>
                    <div class="EditFormLeft">
                        Suffix:</div>
                    <div class="EditFormRight">
                        <asp:DropDownList ID="ddlNameSuffix" runat="server" TabIndex="9">
                            <asp:ListItem Text="Select..." Value="-1"></asp:ListItem>
                            <asp:ListItem Text="Junior" Value="Junior"></asp:ListItem>
                            <asp:ListItem Text="Senior." Value="Senior"></asp:ListItem>
                            <asp:ListItem Text="II" Value="II"></asp:ListItem>
                            <asp:ListItem Text="III" Value="III"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                    <div class="Clear">
                    </div>
                    <div class="EditFormLeft REQ">
                        Birth Date:</div>
                    <div class="EditFormRight">
                        <telerik:RadMaskedTextBox ID="txtBdate" runat="server" Mask="##/##/####" DisplayMask="##/##/####" Width="75px"
                            LabelCssClass="" TextWithLiterals="//" TabIndex="13">
                        </telerik:RadMaskedTextBox>
                    </div>
                </div>
            </td>
            <td style="width: 300px; vertical-align: top;">
                <div class="Clear">
                </div>
                <div class="EditFormLeft REQ">
                    Home Phone:</div>
                <div class="EditFormRight">
                    <telerik:RadMaskedTextBox ID="txtHomePhone" runat="server" SkinID="PhoneBox" TabIndex="11">
                    </telerik:RadMaskedTextBox>
                </div>
                <div class="Clear">
                </div>
                <div class="EditFormLeft REQ">
                    Cell Phone:</div>
                <div class="EditFormRight">
                    <telerik:RadMaskedTextBox ID="txtCellPhone" runat="server" SkinID="PhoneBox" TabIndex="12">
                    </telerik:RadMaskedTextBox>
                </div>
                <div class="Clear">
                </div>
                <div class="EditFormLeft REQ">
                    E-mail Address:</div>
                <div class="EditFormRight">
                    <asp:TextBox ID="txtEmail" runat="server" Width="235" TabIndex="1"></asp:TextBox>
                </div>
                <div class="Clear">
            </td>
        </tr>
    </table>
</fieldset>
  
Edit.ascx.cs:
 public int UserId { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData(); 
            }
        }
   
        private void LoadData()
        {
            if (UserId  > 0)
            {
                using (DataClass DC = new DataClass())
                {
                    UserObjectData User = Custom.User.GetUsersById(UserId );
                    txtFirstName.Text = User.FirstName;
                    txtBdate.Text = ArxUtilities.ObjectConverters.ToStringFromDate(User.BirthDate);
                    txtCellPhone.Text = User.CellPhone;
                    txtEmail.Text = User.Email;
                    txtHomePhone.Text = User.HomePhone;
                    txtLastName.Text = User.LastName;
                    txtMiddle.Text = AcctAuthUser.MiddleInitial;
                    ddlNameSuffix.SelectedValue = User.Suffix;
                }
            }
            else
            {
                txtFirstName.Text = string.Empty;
                txtBdate.Text = string.Empty;
                txtCellPhone.Text = string.Empty;
                txtEmail.Text = string.Empty;
                txtHomePhone.Text = string.Empty;
                txtLastName.Text = string.Empty;
                txtMiddle.Text = string.Empty;
                ddlNameSuffix.SelectedIndex = 0;
            }
        }
Marin Bratanov
Telerik team
 answered on 13 Apr 2011
8 answers
294 views
Hi,

I have download Telerik.Web.UI_2011_1_315_Trial.msi and install but I am working on .net 2.0 and this is for .net 3.5 and 4.0 . Is there any new version for .net 2.0 in which you have solved memory leak issue?

Thanks ,
Hemant

Marin Bratanov
Telerik team
 answered on 13 Apr 2011
1 answer
61 views
Hello,

I want to add ToolTips  for each Tag in a TagCloud (showing various Information about the current Tag... this information should load using ajax).

I already tried some strategies (client and server side) but had no success.

Does somebody has any advice?
Pero
Telerik team
 answered on 13 Apr 2011
3 answers
245 views
hello

        I have image column in database and i need to retrive the value from image url data from db to my auto generated column in rad grid

please reply'

Thanks in advance
Tsvetina
Telerik team
 answered on 13 Apr 2011
3 answers
118 views
Hey, I know this is very basic but, how am I supposed to install the demo in my website ? I'm trying to copy the code from the RadWindow and MDI sample and then copy the Common folder into my WebSite, but some tags are not found still. What am I doing wrong here ?
Marin Bratanov
Telerik team
 answered on 13 Apr 2011
1 answer
88 views
RadEditor does not show properly in Safari browser.When I am using some of the tools,the editor shows only half of it with scroll bar.The rest of the editor remains as white space.
Rumen
Telerik team
 answered on 13 Apr 2011
1 answer
66 views
Hi

I'm using 3 ToolTipManagers in my Project, When I use 2, There is no problem, but when the 3rd one is added, strange things happen, ToolTipManager works fine, but when i want to customize Data in C# code, the Control is not detected by Visual Studio. I'm really confused, How it's even possible?!  
Marin Bratanov
Telerik team
 answered on 13 Apr 2011
3 answers
338 views
Hallo,

I am trying to display multiple series in one Pie-Chart with the following VB-code:
Dim chartSeries As ChartSeries
       Dim dataset As GeschlechterverhaeltnisDataTable = GetMyData()
       Me.pie_Chart.Chart.Series.RemoveSeries()
       Me.pie_Chart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = New Font("Arial", 10)
       Me.pie_Chart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black
       Me.pie_Chart.PlotArea.XAxis.AutoScale = False
       Me.pie_Chart.Legend.TextBlock.Appearance.TextProperties.Color = Color.LightSkyBlue
       Me.pie_Chart.Legend.Appearance.Position.AlignedPosition = AlignedPositions.Right
       For i As Integer = 0 To dataset.Count - 1
           chartSeries = New ChartSeries(dataset(i).Column1.ToString(), ChartSeriesType.Pie)
           chartSeries.AddItem(New ChartSeriesItem(dataset(i).count_result, dataset(i).count_result))
           Me.pie_Chart.Series.Add(chartSeries)
       Next
        Me.Chart_GenderRate.AddChartSerie
s(chartSeries)
In the result, i have a number of charts, which are equal to the "dataset.Count - 1" value.  but all values should be displayed in one chart like the second chart in the following example: Example
Tobias
Top achievements
Rank 1
 answered on 13 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?