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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataGrid can not view data

Thread ID:

Created:

Updated:

Platform:

Replies:

132042 Aug 9,2017 12:21 PM UTC Aug 10,2017 05:14 AM UTC Xamarin.Forms 2
loading
Tags: SfDataGrid
Yigit
Asked On August 9, 2017 12:37 PM UTC

Hello,

I try to bind to data on SfDataGrid like your sample project. But can not view data on the grid.
We just see empty grid screen like https://stackoverflow.com/questions/39273010/syncfusion-datagrid-in-xamarin-forms

Dlls;

PCL;
Syncfusion.Data.Portable, 
Syncfusion.GridCommon.Portable, 
Syncfusion.SfDataGrid.XForms,
Syncfusion.SfNumericTextBox.XForms

Android;
Syncfusion.Data.Portable, 
Syncfusion.GridCommon.Portable, 
Syncfusion.SfDataGrid.XForms, 
Syncfusion.SfNumericTextBox.Android, 
Syncfusion.SfNumericTextBox.XForms, 
Syncfusion.SfNumericTextBox.XForms.Android 

XAML;

             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:App9"
             xmlns:sync="clr-namespace:Syncfusion.SfDataGrid.XForms;assembly=Syncfusion.SfDataGrid.XForms"
             x:Class="App9.MainPage">

   
       
                     HorizontalOptions="FillAndExpand">
           
                             HorizontalOptions="FillAndExpand"
                             VerticalOptions="FillAndExpand"
                             ColumnSizer="Star">
           
       
   

CS;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace App9
{
    public class Person
    {
        public string Name { get; set; }
        public string Surname { get; set; }
    }
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();

            List list = new List
            {
                new Person
                {
                    Name  ="name",
                    Surname = "surname"
                }
            };
            dataGrid.ItemsSource = list;
        }

        private void Button_Clicked(object sender, EventArgs e)
        {
        }
    }
}


Yigit
Replied On August 9, 2017 12:42 PM UTC

Edit XAML;


    <Grid VerticalOptions="FillAndExpand"

                     HorizontalOptions="FillAndExpand">

        <sync:SfDataGrid x:Name="dataGrid"

                             HorizontalOptions="FillAndExpand"

                             VerticalOptions="FillAndExpand"

                             ColumnSizer="Star">

        </sync:SfDataGrid>

    </Grid>


Ashok N [Syncfusion]
Replied On August 10, 2017 05:14 AM UTC

Hi Yigit, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your query and you missed to refer Syncfusion.SfDataGrid.XForms.Android.dll in your android renderer project. You can achieve your requirement by adding this dll in your android project. Please refer the below UG link to get more details about assembly reference for SfDataGrid.   
 
 
Regards, 
Ashok 


CONFIRMATION

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.

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

;