- Home
- Forum
- Xamarin.Forms
- DataGrid can not view data
DataGrid can not view data
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)
{
}
}
}
SIGN IN To post a reply.
2 Replies
YI
Yigit
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>
AN
Ashok N
Syncfusion Team
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
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
YI Yigit
- Aug 9, 2017 12:21 PM UTC
- Aug 10, 2017 05:14 AM UTC
8/15/2026 03:02:06 PM
Sun, 15 December 2024 03:30:00 UTC
Sun, 15 December 2024 03:30:00 AM
Wed, 16 Feb 2022 04:59:00 UTC