We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Popuplayout - change values from SfDataGrid row

Thread ID:





148005 Oct 1,2019 03:59 PM UTC Oct 2,2019 02:38 PM UTC Xamarin.Forms 1
Tags: SfPopup
Tomas Turek
Asked On October 1, 2019 03:59 PM UTC

I have SfDataGrif and I want after tap row show popup layout with all data from a row of SfDataGrid. My problem is that data in popuplayout are shown only after second show of popup dialog (after the second tap of a row) as attached picture. Same for Android and iOS.

Or is there another way how to change values in popuplayout from tapped row? I want to let popup definition in XAML code.

Attachment: Codes_c59e65c9.zip

Karthikraja Kalaimani [Syncfusion]
Replied On October 2, 2019 02:38 PM UTC

Hi Tomas,

Thanks for contacting Syncfusion support,

We have achieved your requirement by this way and prepared a sample for the same. Please refer the below code snippet and sample.

        <local:ViewModel x:Name="viewModel"/> 
        <sfPopup:SfPopupLayout x:Name="popupLayoutAlarmDetail"> 
                <sfPopup:PopupView HeaderTitle="Detail" IsFullScreen="False" ShowCloseButton="False" HeaderHeight="45" HeightRequest="300" FooterHeight="45" AcceptButtonText="OK"> 
                        <sfPopup:PopupStyle BorderColor="Gray" 
                                    AcceptButtonBackgroundColor ="Transparent" 
                                    BorderThickness ="1" 
                            <StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Spacing="0" Margin="5" Padding="5"> 
                                <Grid x:Name="grid" RowSpacing="0" HorizontalOptions="FillAndExpand" VerticalOptions="Start" Margin="0,0,0,-2" Padding="0"> 
                                        <RowDefinition Height="23" /> 
                                        <RowDefinition Height="23" /> 
                                        <RowDefinition Height="23" /> 
                                        <RowDefinition Height="23" /> 
                                        <ColumnDefinition Width="*" /> 
                                        <ColumnDefinition Width="135"/> 
                                    <Label x:Name="LabelDatumCasText"  Grid.Row="0" Grid.Column="0"  HorizontalOptions="FillAndExpand" HorizontalTextAlignment="Start" Text="{Binding labelFirstName,Mode=TwoWay,Source={x:Reference viewModel}}" FontSize="Small" FontAttributes="Bold"/> 
                                    <Label x:Name="LabelDatumCasValue" Grid.Row="1" Grid.Column="0" HorizontalOptions="FillAndExpand" HorizontalTextAlignment="End" Text="{Binding labelLastName,Mode=TwoWay,Source={x:Reference viewModel}}" FontSize="Small" /> 
                <StackLayout Spacing="0" > 
                    <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" > 
                        <StackLayout Spacing="0" AbsoluteLayout.LayoutBounds="1,1,1,1" AbsoluteLayout.LayoutFlags="All"  HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" > 
                            <StackLayout  VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Spacing="0"> 
                                <sfgrid:SfDataGrid x:Name="dataGrid" GridTapped="DataGrid_GridTapped" 
                           ItemsSource="{Binding OrdersInfo}" 
        public MainPage() 
     private void DataGrid_GridTapped(object sender, GridTappedEventArgs e) 
            viewModel.labelFirstName = (e.RowData as OrderInfo).FirstName; 
            viewModel.labelLastName = (e.RowData as OrderInfo).LastName; 

We hope this helps. Please let us know, if you need any further assistance.

Karthik Raja 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon