asp GridView(s) in rotator

5 posts, 0 answers
  1. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 13 Nov 2012 Link to this post

    I am using custom controls (containing grid 1 view) as the rotator items, and want to reuse the same control with different tables (fyi - the control itself has no problems, there are no other controls in the custom control but SQL data-source)

    Now -
    1. I do not want to let the frames cut off
    2. I want to display one frame at a time (and so I want the 1st item)
    3. Is there any way out to replicate the exact behavior as this (https://www.dreamspark.com/Student/Software-Catalog.aspx) page's "Developer & Designer Tools" and "Servers & Applications" section ? (I would love to have the horizontal scroll-bar !)
    4. As I am having gridviews in the frame, I want to persist rotator's index after sorting

    I tried to set the item width equal to the rotator's "Window" size, and said false to wrapping but still they sit one UNDER another (I have two "frames" of my custom user control )

  2. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 16 Nov 2012 Link to this post

    Hello Aarsh,

    As suggested in this help article if you want to achieve smooth items sliding you should ensure that the size of the RadRotator's view port can fit the number of items you want to display at a time. If the properties Width, Height, ItemWidth and ItemHeight are set according to the instructions in the help article and the problem persists, most probably there are global CSS styles that are modifying the size of the rotator items or adding padding/margin thus breaking the correct behavior of the rotator. Please check if there are such styles and try removing them from your page.

    If you want to display only one frame at a time the value of Width should be equal to ItemWidth and Height should be equal to ItemHeight.

    The online demo Slider / Custom Scrollbar will be useful for implementing the behavior from the page you linked.

    You can handle the server-side event OnItemClick of RadRotator to maintain the control's current index. Check the linked article for an example.


    All the best,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 29 Nov 2012 Link to this post

    Thanks Slav. I saw the demo of custom slider and it is stunning. Two thing I would like to mention -
    1. The demo seems to be using http://demos.telerik.com/aspnet-ajax/slider/examples/customscrollbar/Images/Boxes.jpg image meditatively, where as I am more interested to do something in the grid-view.
    2. I already have my custom user control (controlling a grid-view and its data-source) ready and running on the page. I just need to figure out the way to "add" them in to the slider window. 
    <telerik:RadSlider ID="showcaseSlider" runat="server" Orientation="Horizontal" SmallChange="1" Width="100%" Value="0" >
                    <Items>
                        <telerik:RadSliderItem />
                    </Items>
    Or...
                    <ItemBinding />
                </telerik:RadSlider>

    Slav, I tried to use the example mostly as is with having my custom user control (as mentioned in the paragraph above in this post) instead the images ... and I got something Like This...
  5. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 04 Dec 2012 Link to this post

    Hello Aarsh,

    If I understand your scenario correctly, you want to replace the images from the online demo with GridView controls and you have problems positioning them horizontally.

    For your convenience I have prepared a sample page that shows a possible solution for this problem. The setup is similar to the one in the demo. The grid views are placed in the div element with ID boxes_content and each of them is wrapped in a div element so that they can be aligned horizontally via CSS. Also, adding items to the RadSlider is not required in this case.

    Please use the attached sample as a reference for your further development. 

    Regards,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 11 Dec 2012 Link to this post

    Thank you so much Slav, I really appreciate it. I ended up using this scenario.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017