我有一个从 sql server 数据库创建的列表视图,你如何包含行号?
<ListView x:Name="lstName" Height="400" Canvas.Top="55" Width="450">
<ListView.View>
<GridView>
<GridViewColumn Header="Number" Width="auto"
DisplayMemberBinding="{Binding Path=Id}" />
<GridViewColumn Header="FirstName" Width="auto"
DisplayMemberBinding="{Binding Path=FName}" />
<GridViewColumn Header="LastName" Width="auto"
DisplayMemberBinding="{Binding Path=LName}" />
<GridViewColumn Header="StreetAddress" Width="auto"
DisplayMemberBinding="{Binding Path=Street}" />
<GridViewColumn Header="City" Width="auto"
DisplayMemberBinding="{Binding Path=City}" />
<GridViewColumn Header="State" Width="auto"
DisplayMemberBinding="{Binding Path=State}" />
</GridView>
</ListView.View>
</ListView>