Aboli Rathod

Aboli Rathod

  • NA
  • 91
  • 19k

xamarin forms mobile development

May 6 2020 12:30 PM
hi,
 
I want to allign the list view data to proper to that table column heading.now maincode is null but other column data is not alligned to that column.
plz give me suggestion 
 
 
xaml file code
  1. <ListView x:Name="lv" VerticalOptions="FillAndExpand" >  
  2. <!--<ListView x:Name="lv" VerticalOptions="CenterAndExpand" >-->  
  3. <ListView.ItemTemplate>  
  4. <DataTemplate>  
  5. <ViewCell>  
  6. <Grid Margin="2" RowSpacing="1" ColumnSpacing="1" BackgroundColor="#E5E4E2" >  
  7. <Grid.RowDefinitions>  
  8. <RowDefinition Height="*"></RowDefinition>  
  9. </Grid.RowDefinitions>  
  10. <Grid.ColumnDefinitions>  
  11. <ColumnDefinition Width="*"></ColumnDefinition>  
  12. <ColumnDefinition Width="*"></ColumnDefinition>  
  13. <ColumnDefinition Width="*"></ColumnDefinition>  
  14. <ColumnDefinition Width="*"></ColumnDefinition>  
  15. <ColumnDefinition Width="*"></ColumnDefinition>  
  16. </Grid.ColumnDefinitions>  
  17. <Label Grid.Row="0" Grid.Column="1" VerticalTextAlignment="Center" TextColor="Black"  
  18. FontSize="Micro" VerticalOptions="CenterAndExpand"  
  19. Text="{Binding SrNo}" ></Label>  
  20. <Label Grid.Row="0" Grid.Column="2" VerticalTextAlignment="Center" TextColor="Black"  
  21. FontSize="Micro" VerticalOptions="CenterAndExpand"  
  22. Text="{Binding Line}" ></Label>  
  23. <Label Grid.Row="0" Grid.Column="3" VerticalTextAlignment="Center" TextColor="Black"  
  24. FontSize="Micro" VerticalOptions="Center"  
  25. Text="{Binding Machine_Name}"></Label>  
  26. <Label Grid.Row="0" Grid.Column="4" VerticalTextAlignment="Center" TextColor="Black"  
  27. FontSize="Micro" VerticalOptions="Center"  
  28. Text="{Binding MainReasonCode}" ></Label>  
  29. <!--<Label Grid.Row="0" VerticalTextAlignment="Center" TextColor="Black"  
  30. FontSize="Micro" Grid.Column="4"  
  31. Text="{Binding ActionTaken}" ></Label>-->  
  32. <Label Grid.Row="0" Grid.Column="5" VerticalTextAlignment="Center" TextColor="Black"  
  33. FontSize="Micro" VerticalOptions="Center"  
  34. Text="{Binding RaisedBy}"></Label>  
  35. </Grid>  
  36. </ViewCell>  
  37. </DataTemplate>  
  38. </ListView.ItemTemplate>  
  39. </ListView> 

Answers (2)