Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How to bind data into Entry in XFGrid

$
0
0

I need code to bind data in Entry which is located in XFGrid. I used below code

  <ig:XFGrid x:Name="grid">
    <ig:ListAdapter x:Name="adapter" AutoGenerateColumns="False" >
      <ig:ListAdapter.ColumnDefinitions>
        <ig:TextColumnDefinition x:Name="col1" Key="A" ColumnHeaderLabel="A" Width="80" />
        <ig:TextColumnDefinition x:Name="col2" Key="B" ColumnHeaderLabel="B" Width="200" />
        <ig:TextColumnDefinition x:Name="col3" Key="C" ColumnHeaderLabel="C" Width="70" />
        <ig:TextColumnDefinition x:Name="col4" Key="D" ColumnHeaderLabel="D" Width="80" />          
        <ig:TemplatedColumnDefinition x:Name="col5" Key="E" ColumnHeaderLabel="E" Width="85" >
          <ig:TemplatedColumnDefinition.CellTemplate>
            <DataTemplate>
               <Entry x:Name="txtE" TextColor="Black" Text="{Binding E}" ></Entry>
            </DataTemplate>
          </ig:TemplatedColumnDefinition.CellTemplate>
        </ig:TemplatedColumnDefinition>
      </ig:ListAdapter.ColumnDefinitions>
    </ig:ListAdapter>
  </ig:XFGrid>

public ObservableCollection<GridData> Data { get; set; }

public class GridData
{
    public string A { get; set; }
    public string B { get; set; }
    public string C { get; set; }
    public string D { get; set; }
    public string E { get; set; }
}

Please help me :)


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>