This is a migrated thread and some comments may be shown as answers.

Responsive View?

13 Answers 81 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
DogBizPro
Top achievements
Rank 1
DogBizPro asked on 23 Aug 2016, 06:21 PM
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?

13 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 25 Aug 2016, 07:51 AM
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.
0
DogBizPro
Top achievements
Rank 1
answered on 30 Aug 2016, 02:23 PM

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;
            }

 

0
Konstantin Dikov
Telerik team
answered on 31 Aug 2016, 05:25 AM
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.
0
DogBizPro
Top achievements
Rank 1
answered on 01 Sep 2016, 05:22 PM
That is always returning 0
0
Konstantin Dikov
Telerik team
answered on 06 Sep 2016, 10:33 AM
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.
0
DogBizPro
Top achievements
Rank 1
answered on 06 Sep 2016, 06:16 PM

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;

0
Konstantin Dikov
Telerik team
answered on 09 Sep 2016, 08:31 AM
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.
0
DogBizPro
Top achievements
Rank 1
answered on 09 Sep 2016, 05:21 PM
On my Samsung Galaxy s6 in Chrome
0
Konstantin Dikov
Telerik team
answered on 14 Sep 2016, 01:19 PM
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.
0
DogBizPro
Top achievements
Rank 1
answered on 14 Sep 2016, 01:27 PM

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....

0
Konstantin Dikov
Telerik team
answered on 19 Sep 2016, 06:02 AM
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.
0
DogBizPro
Top achievements
Rank 1
answered on 19 Sep 2016, 12:56 PM
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'?
0
Konstantin Dikov
Telerik team
answered on 22 Sep 2016, 04:44 AM
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.
Tags
Calendar
Asked by
DogBizPro
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
DogBizPro
Top achievements
Rank 1
Share this question
or