Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
160 views
This query has come about from the fact that i dont believe you can scroll - using the Rotator Buttons - by one Rotator Item at a time (http://www.telerik.com/community/forums/aspnet-ajax/rotator/scrolling-1-item.aspx)

this is my code so far

<telerik:RadRotator Width="350px" Height="75px"  ItemHeight="75px" ItemWidth="75px" CssClass="horizontalRotator" WrapFrames="false" ScrollDuration="500"  RotatorType="Buttons"   runat="server" ID="imageRotator">
    <ItemTemplate >
       <img id="imgCarousel2" class="item" width="75" height="75" class="item" src="<%#Eval("PhotoFile")%>"alt="" onclick="ChangeRecipePhoto('<%#Eval("PhotoFile")%>','<%#Eval("PhotoID")%>')" />                                                      
    </ItemTemplate>                      
</telerik:RadRotator>

imageRotator.DataSource = Photos()
imageRotator.DataBind()

   <style type="text/css">
       .item {
     border: solid 10px #fff;
     margin: 1px;
}
   </style>

now, the amount of images that need to be shown could be 7,8,9 or anything else.
my RadRotator Width has been set so that it fits 4 images at any point in its scrolling:
e.g. the RadRotator is 350px in Width.
the inidividual items in the RadRotator are 75px in Width
This means that 75 * 4 is 300 (+ an extra 40px for the Buttons - as per this page:   http://www.telerik.com/help/aspnet-ajax/rotator-configuration.html
and an extra 10px for the extra border width i have added to the Style).

unfortunately, this means that if the amount of images is 5, the first page will show 4 images fine, but when i scroll using the Rotator scroll button, the next screen is of 1 image and an empty space that could accomodate another 3 images. 

i suppose i have 3 solutions that i would be keen to see if exists.

1. that it is possible to scroll one image at a time so that it doesn't show the empty space

2. dynamically add the necessary amount of 'placeholder' images so that it doesn't have the empty space (e.g if amount of images is less than the next multiple of 4, add the required amount of 'placeholders' to get it to be the next multiple of 4).

3. some other means of showing that the blank space is by design and not looking like there should be images.

thanks.

David
Top achievements
Rank 1
 answered on 08 Aug 2013
1 answer
56 views
We have gotten a problem after recently updating to latest telerik radcontrols, if you put a list inside a table cell - the list is placed outside the td-tag, creating invalid HTML. Have tested this on a plain editor with no configuration. Any known fixes to this?

The version running is v.2013.2.717.40
Ianko
Telerik team
 answered on 08 Aug 2013
3 answers
155 views

Good morning,
I've a old code for delete row of Grid.

I've a Bound Column in grid

<telerik:GridBoundColumn UniqueName="WebUserCode" DataField="WebUserCode" Display="false" />

and a Grid ButtonColumn

<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow"
                  ConfirmText="Confermare l'eliminazione del record ?" ConfirmTitle="Conferma eliminazione"
                  ImageUrl="~/Images/16x16/delete2.png" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="3%"
                  Text="ELIMINA DATO" UniqueName="DeleteColumn" HeaderText="ELIMINA">
                  <ItemStyle HorizontalAlign="Center" Width="3%" />
              </telerik:GridButtonColumn>

this is the old code

protected void gvList_DeleteCommand(object sender, GridCommandEventArgs e)
   {
       GridDataItem row = gvList.Items[e.Item.ItemIndex];
 
       try
       {
           item.Delete(Int32.Parse(row.Cells[2].Text));
       }
       catch (Exception ex)
       {
           notError.Title = "ELIMINAZIONE FALLITA";
           notError.Title = "L'ELIMINAZIONE DEL DATO HA CAUSATO PROBLEMI";
           notError.Show();
           WebTools.SendMailError(((System.Web.UI.TemplateControl)(this.Page)).AppRelativeVirtualPath, System.Reflection.MethodInfo.GetCurrentMethod().Name, ex, WebUser);
       }
 
       PopulateGridView();
   }

 

The problem is that with the last version of RadGrid  row.Cells[2].text is NULL, I think for the Visible="False" property.

How can I access at the bound column for to know the code of the record ?

Thanks

Princy
Top achievements
Rank 2
 answered on 08 Aug 2013
1 answer
71 views
Hi,
using Rad Scheduler control. but on Weekly view Date is showing incorrect .
It showing Sunday to  Friday instead of Sunday to Saturday.

Plz find attached image.

Thanks,
Ram
Plamen
Telerik team
 answered on 08 Aug 2013
4 answers
151 views
Hi,
I am using Telerik.Web.UI version:2012.1.501.40
I have a Radgrid on webform so user can right click and select one option from Menu, which is working fine in regular browsers.
I am trying to implement Long touch event for IPad(which can't do right click)
I have gone through below example and didn't get work it out.
http://www.telerik.com/community/forums/aspnet-ajax/menu/radcontextmenu---ipad-safari-right-click.aspx

Here is the code on page
<telerik:RadScriptManager ID="ScriptManager" runat="server" />
 
 <telerik:RadContextMenu ID="RadContextMenu1" runat="server" EnableRoundedCorners="true" EnableShadows="true" OnClientItemClicked="MenuItemClick">
<Items>
  <telerik:RadMenuItem Text="View by Ase Order" Value="ase">
  </telerik:RadMenuItem>
  <telerik:RadMenuItem Text="View by Desc Order" Value="desc">
  </telerik:RadMenuItem>          
</Items>
    </telerik:RadContextMenu>
 
 <telerik:RadGrid runat="server" ID="RadGrid1" >
      <ClientSettings>
      <ClientEvents OnRowContextMenu="RowContextMenu" />
      </ClientSettings>           
</telerik:RadGrid>
 
<script type="text/javascript" language="javascript">
 
        var lastContext = null;
        var longTouchID = 0;
 
        function longTouch() {
            longTouchID = 0;
            $find('RadGrid1')._RowContextMenu(lastContext);
        }
 
        function handleTouchStart (e) {
            lastContext = e;
            lastContext.target = e.originalTarget;
            lastContext.pageX = e.changedTouches[0].pageX;
            lastContext.pageY = e.changedTouches[0].pageY;
            lastContext.clientX = e.changedTouches[0].clientX;
            lastContext.clientY = e.changedTouches[0].clientY;
            longTouchID = setTimeout(longTouch, 1000);
        }
 
        function handleTouchEnd (e) {
            if (longTouchID != 0)
                clearTimeout(longTouchID);
        }
 
        function pageLoad() {
            if ($telerik.isMobileSafari) {
                var gridArea = $get('RadGrid1');
                gridArea.addEventListener('touchstart', handleTouchStart, false);
                gridArea.addEventListener('touchend', handleTouchEnd, false);
            }
        }
 
      function RowContextMenu(sender, eventArgs)
            {
                var menu = $find("<%=RadContextMenu1.ClientID %>");
                var evt = eventArgs.get_domEvent();
  
                if (evt.target.tagName != "A")
                {
                    return;
                }
 
                document.getElementById("radGridName").value = sender.ClientID;
                
                var index = eventArgs.get_itemIndexHierarchical();                
  
                sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
                sender.get_masterTableView().get_dataItems()[index].set_selected(false);
  
                menu.show(evt);
  
                evt.cancelBubble = true;
                evt.returnValue = false;
  
                if (evt.stopPropagation)
                {
                    evt.stopPropagation();
                    evt.preventDefault();
                }
            }

It's not opening Context Menu for long touch on IPad.
What i am missing here?

Boyan Dimitrov
Telerik team
 answered on 08 Aug 2013
1 answer
62 views
OnClientButtonClicking event not working for radtoolbar ASP.NET Q2 2008. Visual studio 2012 but framework 2.0.
Kate
Telerik team
 answered on 08 Aug 2013
4 answers
388 views
Markup .aspx
<telerik:RadPanelBar ID="PanelBar1" Height="100px" Width="100%" EnableEmbeddedSkins="false" Skin="MyCustonSkin" runat="server">
</telerik:RadPanelBar>


Code Behind .aspx.cs

protected void Page_Load(object sender, EventArgs e)
{
    RadPanelItem myProfilePanelItem = new RadPanelItem();
    myProfilePanelItem.Text = "My Profile";
 
    RadPanelItem myFavoritesPanelItem = new RadPanelItem();
    myFavoritesPanelItem.Text = "My Favorites";
    Button btnSearchFavorites = new Button();
    btnSearchFavorites.Text = "Search more favorites";
    btnSearchFavorites.CssClass = "ButtonStyle";
    btnSearchFavorites.Click += new EventHandler(btnSearchFavorites_Click);
    myFavoritesPanelItem.Controls.Add(btnSearchFavorites);
 
    PanelBar1.Items.Add(myProfilePanelItem);
    PanelBar1.Items.Add(myFavoritesPanelItem);
}


protected void btnSearchFavorites_Click(object sender, EventArgs e)
{
    Response.Redirect("~/Favorites", false);
}

The problem is that the btnSearchFavorites_Click event is not firing when the button is clicked.
imran
Top achievements
Rank 1
 answered on 08 Aug 2013
3 answers
184 views
Hi 

I'm using .net 2.0 and vb.net , web forms

On my master page there is a radmenu. This menu has 4 buttons that if you hover over any of them then , then a drop down will appear. and each drop down has 1 to 5 buttons.  example below

......home...... menu1........menu 2.......menu3.....menu4
                      a                 t                  s             v
                      b                                    w                    
                      c                                    q
                      d
                      e


my question is:

from the code behind on my .aspx page, how do I disable "menu1" and all its buttons.

I still want to see it  but just it must not link.

right now I have this   


Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load

Me.FindControl("Mymenu").Visible = True

          'how do I disable "menu1" and all its buttons.

        Dim m As Telerik.Web.UI.RadMenu = CType(MyBase.Master.FindControl("Mymenu"), Telerik.Web.UI.RadMenu)

        m.item find("menu1").Disable()


    End Sub
End Class




Code
Top achievements
Rank 1
 answered on 08 Aug 2013
1 answer
113 views
Hi

How to set the radwindow behavior to close from javascript?

Thanks
Saravanan
Shinu
Top achievements
Rank 2
 answered on 08 Aug 2013
1 answer
476 views
Trying to Copy Paste date format(01/01/2013) is accepting in numeric text box. after moving out of that control it is displaying (01012013). But when i moving out of the control, i need to display a warning message, please enter valid numeric values instead of removing special character.
Shinu
Top achievements
Rank 2
 answered on 08 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?