1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Pushing the envelope with the content view / DownloadList

Pushing the envelope with the content view / DownloadList

10 posts, 0 answered
  1. UI Crew
    UI Crew avatar
    151 posts
    Registered:
    27 Sep 2012
    24 Apr 2008
    Link to this post
    Hi,

    We are doing great with the new Images & Documents module and it has thus far meet all our requirements so thank for your forsight. We have been able to achieve about 95% of our customers design requirements with the downloads list!

    I have looked through the developer manual but can't find much in the api about the sitefinity pager control and it's abilities.

    Before I go coding out a solution I was wondering if out of the box (or with some extra inline code) the sfweb pager or repeater in the content view has pre-built ability to do the following couple of things.

    We are aiming to achieve this layout here - http://www.webinsites.net/clients/designs/Document-List_v0.2.jpg - we have done so apart from the following little minor questions:

    1. At the top of the repeater display (in this instance the repeater is got paging on, displaying page 1 and set to display 9 items per page):

    Displaying 1 - 9 of 44 results

    2. Can you add to the templates available on the Basic tab of the DownloadList (or any content view). We would like to delete the table based one and add 2 more (3 in total).

    If it is basically the same as the principles used in the Dev Manual article "add new field to the module's properties"  i will be able to work it out.

    3. Can the public user change the SortExpression via a drop down like in the image?

    Again if it possible but only by creating my own version of the control... I will be able to work it out.

    I know most of these questions can probably be sort by extending the DownloadList control myself i was just wondering if there was any  quick wins that could be achieved in the current control.

    Again... having worked with module for a couple of days let me say you have done a good job - it's working nicely.

    Thanks

    Seth







  2. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    29 Apr 2008
    Link to this post
    Hello Seth,

    Thank you very much for the nice words. It's good to know that the module is usable and convenient for your needs. However, it seems that you would need to extend the public control functionality in a way.

    Unfortunately, you would not be able to achieve the "Displaying 1 - 9 of 44 results" functionality. At least not easily. In order to get the whole items shown in the list you should use the LibraryManager object and thus make one additional request to the database. However you could achieve easily the "1 - 9" functionality, by using the pager's data inside the DownloadList template. This would be something similar to:

    <%= (pager1.SelectedPage - 1) * 30 + 1 %> - <%= (pager1.SelectedPage) * 30 %> 

    where 30 is the number of items shown per page. We would do our best to overcome this omission of ours for the next release.

    To achieve the sorting expression and different list views, I would suggest to create a user control which wraps the DownloadList control, DropDown list control, and LinkButtons for the different views. You could preserve the selected mode and sorting expression in the query string as achieving this functionality with postbacks would be quite a challenge.

    More specifically, you could achieve the different views of the data not by creating different modes but by loading different templates for each option. You could also extend the designer functionality following the article you mention in the dev manual.

    Actually, I tried to come up with a solution for your problem which I am attaching to this thread. It has only a basic functionality but hope you find it useful. Thanks for the insights and good luck with your site.

    Greetings,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. creatif
    creatif avatar
    6 posts
    Registered:
    01 Feb 2008
    12 May 2008
    Link to this post
    I'm working with roughly 25-30 custom libraries for training purposes, and like the possibility of extending the simple example you've started here.

    How would I go about setting which Library the download list should display?
  4. creatif
    creatif avatar
    6 posts
    Registered:
    01 Feb 2008
    12 May 2008
    Link to this post
    To clarify a bit more ...

    I'm wondering how to dynamically set what Library item to show (similar to how dropping a standard downloadList provides property builder to select which Library I want to display).

    The primary reason that I am looking at extending this very simplified form is that I cannot seem to figure out how to enable Ajax functionality of the stock downloadList -- which, despite how fantastic a control it is and how extensive the properties are for controlling it, renders it useless to me.

    So ... my alternative question is this:

    Using the current downloadList control that is part of the stock Sitefinity controls, how in the heck do I get that to operate within a Telerik AjaxPanel or a Telerik AjaxManager? I'd like to still have all the other properties available for editing/controlling the download list control.
  5. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    13 May 2008
    Link to this post
    Hi Bob,

    We would be able to give you guidance on the implementation you are developing, if you provide us with more specific information about the exact functionality you are trying to achieve. Also, could you send us your code of the DownloadList control which contains the changes you have made when trying to ajaxify it?

    Thank you for the cooperation.

    Kind regards,
    Nikifor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. UI Crew
    UI Crew avatar
    151 posts
    Registered:
    27 Sep 2012
    15 May 2008
    Link to this post
    Hi Vassil,

    Thanks for the code example... that's the fucntionality we are after.

    Is it possible to use this method but still expose the Basic and Advaced properties editor of the downloadlist or is that the sacrificed in with the simplisity of using this type of method?

    Thanks

    Seth
  7. creatif
    creatif avatar
    6 posts
    Registered:
    01 Feb 2008
    15 May 2008
    Link to this post
    Seth's right on the money with what I'm after.

    Using the method Vassil provided makes it quite easy to drop the download list inside an AjaxPanel to provide a more comfortable experience for browsing through a particular library.

    Now . . .  how would we expose the basic & advanced properties of the standard download list?
  8. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    19 May 2008
    Link to this post
    Hello Bob and Seth,

    Exposing the properties of the DownloadList control can be achieved quite easily. All you need to do is create a public property which exposes the DownloadList control itself. Thus in the admin part, you will get an edit button next to the property's TextBox which would show all its properties on click. However, you would not be able to see the basic properties view for the DownloadList control:

    public DownloadList ListControl  
    {  
        get 
        {  
            return this.downloadList;  
        }  
        set 
        {  
            this.downloadList = value;  
        }  

    Hope this helps.

    All the best,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Lyn
    Lyn avatar
    15 posts
    Registered:
    30 Apr 2008
    23 May 2008
    Link to this post
    Hi,

    Any chance of the "displaying x - y of z articles" functionality making it into service pack 2?

    Thanks

    Seth
  10. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    26 May 2008
    Link to this post
    Hi Seth,

    We have plans to implement such pager but unfortunately, it won't make it into the upcoming SP2.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
10 posts, 0 answered