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

How to get selected row id value in XFGRid

$
0
0

Hi, I need code to get selected row id value from lable which is located inside the XFGrid. I used below code

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

Please help me :)


Viewing all articles
Browse latest Browse all 77050

Trending Articles