Responsive View?

14 posts, 0 answers
  1. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 23 Aug Link to this post

    We are currently using the calendar in our application and going to a 'responsive view'. Is there a way to base the "MultiViewColumns" and "MultiViewRows" on the size of the screen?
  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 25 Aug Link to this post

    Hi Stephanie,

    You can use the Device Detection Framework for changing the MultiViewColumns and MultiViewRows properties, based on the screen size:
    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 30 Aug in reply to Konstantin Dikov Link to this post

    Thanks but it doesn't seem to work....

    I added the following, but even when I narrow my browser on my laptop to where all the other controls show the "Small" or "XSmall" setting this still returns "XLarge"....

                DeviceScreenSize screenSize = Detector.GetScreenSize(Request.UserAgent);
                if (screenSize == DeviceScreenSize.Small)
                {
                    radCalendar.MultiViewColumns = 2;
                }

     

  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 31 Aug Link to this post

    Hi Stephanie,

    Have you tried to customize the RadCalendar based on the Height and Width properties returned from the DeviceScreenDimensions (Detector.GetScreenDimensions(Request.UserAgent))?



    Regards,
    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  6. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 01 Sep in reply to Konstantin Dikov Link to this post

    That is always returning 0
  7. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 06 Sep Link to this post

    Hi Stephanie,

    As documented in the help article, if there is no match for the device made the request, the Width and the Height will be 0, but opening the page from mobile devices will return the correct size. As for the DeviceScreenSize, the size of the browser will not make any difference on the screen size of the device, because this is a client characteristic. If you need to make any changes to view depending on size of the browser's window you will have to retrieve that information on the client and pass it to the server manually. For example, you can store that information in a HiddenField and initiate a postback when the size of the window changes.

    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  8. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 06 Sep in reply to Konstantin Dikov Link to this post

    This does NOT work. It still shows as 3 months accross on my phone....

                //DeviceScreenDimensions screenSize = Detector.GetScreenDimensions(Request.UserAgent);
                //if (screenSize.Width > 0 && screenSize.Width <= 500)
                //    radCalendar.MultiViewColumns = 1;
                //else if (screenSize.Width > 500 && screenSize.Width < 1000)
                //    radCalendar.MultiViewColumns = 2;
                //else
                //    radCalendar.MultiViewColumns = 3;

     

     

    This does seem to work....

     

                DeviceScreenSize screenSize = Detector.GetScreenSize(Request.UserAgent);
                if (screenSize == DeviceScreenSize.Small)
                    radCalendar.MultiViewColumns = 1;
                else if (screenSize == DeviceScreenSize.Medium)           
                    radCalendar.MultiViewColumns = 2;
                else
                    radCalendar.MultiViewColumns = 3;

  9. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 09 Sep Link to this post

    Hello Stephanie,

    Can you please elaborate on what device you are testing the and on which browser? As I have mentioned previously, if there is no match for the device making the request, the GetScreenDimensions method will return 0 and you will have to use the GetScreenSize method instead.


    Regards,
    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  10. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 09 Sep in reply to Konstantin Dikov Link to this post

    On my Samsung Galaxy s6 in Chrome
  11. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 14 Sep Link to this post

    Hi Stephanie,

    The Samsung Galaxy S 6 model is not included in our data, but I will forward this to our developers team, so they could include it for the future releases. For the time being you could use the approach with the GetScrenSize method.


    Best Regards,
    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  12. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 14 Sep in reply to Konstantin Dikov Link to this post

    Really?? That phone has been out for at least a year and it is not included. How does that work when my clients get new devices then? When do you typically add them? That seems like a HUGE issue.

     

    I have tried the other method you suggested first and that didn't seem to work either....

  13. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 19 Sep Link to this post

    Hello Stephanie,

    There is a internal list with the UserAgents and the DeviceModels, which contains the information needed by the Device Detection Framework. As I have mentioned, I will forward this to our developers, so they could update those lists accordingly.

    As for the GetScreenSize approach, you have mentioned in one of your previous posts that this approach works and allows you to change the views of the RadCalendar, which is why I suggested that you keep using this approach.

    Please excuse us for any inconvenience caused by this.
     

    Best Regards,
    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  14. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 19 Sep in reply to Konstantin Dikov Link to this post

    Thanks. I understand that, but why did it take this long to update a phone that is over a year old? That is the question? If another new phone comes out tomorrow when do you update the 'list'?
  15. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 21 Sep Link to this post

    Hello Stephanie,

    Although that there is no fixed time frame in which the list is updated, you should keep in mind that it is not possible to update that list with every new phone that is coming out. However, all popular phones should be updated as soon as possible, so as I have mentioned, I will forward this to our developers team and furthermore, we will reconsider the practice for updating the list regularly.
      

    Regards,
    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017