- Home
- Forum
- Xamarin.iOS
- How to set column width when orientation mode is changed ?
How to set column width when orientation mode is changed ?
Attachment: sfdatagrid_question_2b617883.zip
Hi Raphael,
Thank you for using Syncfusion Products.
Currently there is no support for “auto layout”. However we have already considered this as a feature and it will be available in our volume 3 SP1 release. We appreciate your patience until then. For now, as a workaround you can achieve your requirement from the sample by manually setting the width of the Columns when the orientation changes.
For your reference, we have prepared a sample based on this in which we have two columns. First column having the width of 3/4th of the frame and the second column having the width of 1/4th of the frame. When the orientation changes we had reapplied the column width in the ViewDidLayoutSubViews override. You can download the sample from the below location.
http://www.syncfusion.com/downloads/support/forum/120531/ze/Sample1293237356
Regards,
Dharmendar
Attachment: issues_9342a515.zip
We have analyzed your query with UIViewControler inside a "TabBarController" and we are able to reproduce the issue “columns are not expanding to the sfGrid frame size”. We have already fixed this issue and this fix will be available in upcoming release which is scheduled to be released by the end of this month. However we are not able to reproduce the issue “vertical scrolling not working in landscape mode”. It is working fine from our side. We have prepared a sample meeting your requirements with our latest dlls and you can download the same from the below location:
Sample link: http://www.syncfusion.com/downloads/support/forum/120531/ze/Sample-1334401496
Regards,
Dharmendar
We have analyzed your query and we are able to reproduce the “Custom theme not applied on moving to second tab” issue. We have fixed it internally and the fix will be available in our upcoming main release Volume 3 scheduled to be rolled out by the end of September 2015. As of now you can avoid this issue by applying the custom theme in the GridViewCreated event.
Regarding the “scrolling not working” issue, we are unable to reproduce the issue and it is working fine from our side. Since we had generated only 20 items in the sample last provided and the row height is less than the default row height value in the tab2, it might have looked like the grid is not scrolling as there were no more rows to scroll in portrait mode. We have modified the sample with the latest dlls (which includes column not expanding fix) to generate more data and to apply the custom theme in GridViewCreated event for your reference and you can download the sample from the below link.
Sample link: http://www.syncfusion.com/downloads/support/forum/120531/ze/Sample-1672756835
Please let us know if you have any query.
Regards,
Dharmendar
Attachment: sfDataGrid_Issue_e2a4bdf6.zip
Thank you for your response.
We have analyzed your query and tried to host the SfDataGrid as per your requirements and scrolling is working fine from our side. We got the grid scrolling and fit within the frame set for it. We tried the following method: inside a TabBarController we inserted two tabs each having a ViewController and hosted the grid in the second tab. As you mentioned we have created a view called “DataGridSaldoBancarioUIView” and added it as a subview of the second tab ViewController’s default view with a custom size. SfDataGrid is hosted within this view and it works fine with the frame it is arranged with. However we noticed an issue from our side. When scrolling, the last row of the Grid is not clipped if it extends the grid’s bottom frame and hence it might have looked like the grid is not fitting within its frame. We have fixed the issue internally and it will be included in our upcoming main release scheduled to be released by the end of September, 2015.
We have prepared a sample based on your requirements with the custom dlls (which includes the fix for bottom clipping). We have also attached the screenshot of the issue that we faced and the screenshot of the correctly working grid for your reference.
You can download the sample and the screenshots from the below location:
Download link:http://www.syncfusion.com/downloads/support/forum/120153/ze/ScreenShots__and_Sample1726072537
For better understanding, we have modified the background color of the Default View inside the second tab ViewController to “Red” and the background color of the “DataGridSaldoBancarioUIView” to “Green”and hosted the SfDataGrid inside it with a custom size. Incase if this does not fix your problem, please revert us with the modified sample based on your application requirement with clear replication procedure.
Please let us know if you have any query.
Regards,
Dharmendar
Attachment: sfDataGrid_images_and_cs_file_dba35596.zip
Thank you for your response.
We have analyzed your query. In the screenshot that you have sent please note that there is warning at the right corner for the height constraint which is the reason for this issue. If you click the update constraints button there then the constraint will be set correctly and the grid will load within the view. I have attached some screen regarding these view constraints for your reference.
However if you have not set this height constraint for the purpose of orientation changes, then there will be height changes in the layout passes because of it and we are able to reproduce the issue in our side in such case. We have fixed it internally and this fix will be available in Volume 3 SP1 release which is scheduled to release by the end of October. As for now you can avoid this issue by skipping the first layout pass for the grid. You need to layout the grid only after the constraint is set for the internal view from the Storyboard. We have prepared a sample based on this work around and we have used a Boolean flag “skip” to skip the first layout pass for the grid and you can download the sample and the screenshots from the below location.
Sample link : http://www.syncfusion.com/downloads/support/forum/120531/ze/Samples_and_ScreenShots-646496901
Please let us know if you have any query.
Regards,
Dharmendar
As promised, the fix for the reported issue will be available in the Volume 3 SP1 release which is scheduled to be released by the end of October.
Regards,
Harikrishnan
We are glad to announce that our Essential Studio Volume 3, 2015 is rolled out which includes the fix for the reported issues “Grid does not resize on rotation” and “GridStyle not applied when applying before the grid load”. It is available for download under the following link.
https://www.syncfusion.com/forums/120659/essential-studio-2015-volume-3-final-release-v13-3-0-7-is-available-for-download
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Harikrishnan
Thank you for your update.
As promised, the fix for the reported issue will be available in the Volume 3 SP1 release which is scheduled to be released by the end of October.
Regards,
Harikrishnan
- 16 Replies
- 3 Participants
-
SA SAGE
- Sep 23, 2015 08:00 PM UTC
- Oct 6, 2015 12:13 PM UTC