Want to build the ChatGPT based Apps? Start here
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Aboli Rathod
2.1k
91
14.7k
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
<ListView x:Name=
"lv"
VerticalOptions=
"FillAndExpand"
>
<!--<ListView x:Name=
"lv"
VerticalOptions=
"CenterAndExpand"
>-->
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Margin=
"2"
RowSpacing=
"1"
ColumnSpacing=
"1"
BackgroundColor=
"#E5E4E2"
>
<Grid.RowDefinitions>
<RowDefinition Height=
"*"
></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=
"*"
></ColumnDefinition>
<ColumnDefinition Width=
"*"
></ColumnDefinition>
<ColumnDefinition Width=
"*"
></ColumnDefinition>
<ColumnDefinition Width=
"*"
></ColumnDefinition>
<ColumnDefinition Width=
"*"
></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Grid.Row=
"0"
Grid.Column=
"1"
VerticalTextAlignment=
"Center"
TextColor=
"Black"
FontSize=
"Micro"
VerticalOptions=
"CenterAndExpand"
Text=
"{Binding SrNo}"
></Label>
<Label Grid.Row=
"0"
Grid.Column=
"2"
VerticalTextAlignment=
"Center"
TextColor=
"Black"
FontSize=
"Micro"
VerticalOptions=
"CenterAndExpand"
Text=
"{Binding Line}"
></Label>
<Label Grid.Row=
"0"
Grid.Column=
"3"
VerticalTextAlignment=
"Center"
TextColor=
"Black"
FontSize=
"Micro"
VerticalOptions=
"Center"
Text=
"{Binding Machine_Name}"
></Label>
<Label Grid.Row=
"0"
Grid.Column=
"4"
VerticalTextAlignment=
"Center"
TextColor=
"Black"
FontSize=
"Micro"
VerticalOptions=
"Center"
Text=
"{Binding MainReasonCode}"
></Label>
<!--<Label Grid.Row=
"0"
VerticalTextAlignment=
"Center"
TextColor=
"Black"
FontSize=
"Micro"
Grid.Column=
"4"
Text=
"{Binding ActionTaken}"
></Label>-->
<Label Grid.Row=
"0"
Grid.Column=
"5"
VerticalTextAlignment=
"Center"
TextColor=
"Black"
FontSize=
"Micro"
VerticalOptions=
"Center"
Text=
"{Binding RaisedBy}"
></Label>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Reply
Answers (
2
)
xamarin forms mobile development
xamarin forms -get the imei number