On another thread, I worked out my XamDataGrid pulling data from a Sqlite db. I have a new problem that I'm not sure if I missed something in my setup or possibly there is a glitch in the latest Xamarin install on iOS. My test app seems to work fine on Android, but when I try it out on iOS on a physical iPhone, it is just not there. My search bar is there, the label to display the selected item is there but they are right on top of one another with no Grid at all. This is not a problem with my previous version using a Listview in place of the Datagrid. Any ideas? Something to look for, etc.?
Hello Michael,
Which version of Xamarin and iOS? Have you tried our samples browser?Please provide a sample demonstrating the issue.
I played around with the Grid Height and suddenly I had a XamDataGrid on iOS. But I complained about this before but I'm going to talk about it again. When you are a new programmer to your controls you do need excellent IMHO examples. I got into the browser example in my Document directory and here is what I found. Yes, you have two projects, one an old portable project, and another XF aka Xamarin.Forms. Since I have had trouble bringing any kind of Xamarin portable project up to where I could use it with VS 2019, etc I copied the project to another working director and decided to remove the portable project. Lots, literally maybe 150 errors. Turned out instead of making the new XF project wholly independent the programmers adding that project when they didn't have a given source file just referred to the Portable project. Hum, so I add the missing files until at one point I found that a C# file in XF was referring to a file in the portable project that was using Infragistics.XF.DataVisualizarion, which now is I suppose is replaced by Infragistics.Core.DV, but that is just a guess on my part. I am an example learner, not just reading dry prose. So when I have to fix source code to see something in action it is a real bite. I frankly should be able to download the latest example, maybe update the Nuget packages a little, and run. To see what I'm aiming at?
Setting a height is not necessary for either iOS or Android unless the grid is placed with something like a StackLayout that doesn't use virtualization in which case, setting the VerticalOptions property or HeightRequest will resolve this. I just double checked our samples browser on iOS and they're showing up with a iOS 13.5/simulator.
eg. If you are wrapping the grid inside a something like a StackLayout that doesn't support virtualization you can do this. Either VerticalOptions or HeightRequest will help.<StackLayout> <ig:XamDataGrid x:Name="grid" VerticalOptions="FillAndExpand" HeightRequest="800" ItemsSource="{Binding ListItem}" AutoGenerateColumns="True" DefaultColumnMinWidth="100"> </ig:XamDataGrid> </StackLayout>
Good to know thanks! I'll look into it.