I have two issues with Xamarin Grid and ListView.
(1) In ListView, I have seven columns. Based on a condition, the fifth and sixth columns need to be hidden in such a way that there is no blank space visible after forth column. I tried to set IsVisble=false but it shows blank space in between.
(2) Similar issue is with Grid. Inside a ContentView, I have Grid with ten rows. Based on certain condition, I want to hide rows seven and eight in such a way that the empty portion should get collapsed. User should not be able to view the empty row.
If from code-behind I try removing rows using the below code, I suspect the .XAML may crash as row numbers need to be reordered.
GridView gv = listview.View as GridView;
GridViewColumn cd = gv.Columns[0];
gv.Columns.Remove(cd);
gv.Columns.Add(cd);