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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfDataGrid is unusable in SelectionMode.Single since the 13.4.0.58 update

Thread ID:

Created:

Updated:

Platform:

Replies:

122139 Feb 19,2016 01:44 PM UTC Feb 22,2016 12:29 PM UTC Xamarin.Android 1
loading
Tags: SfDataGrid
Denis Lapiner
Asked On February 19, 2016 01:44 PM UTC

In the new version 13.4.0.58 the Xamarin.Android version of SfDataGrid is broken when used with SelectionMode.Single.

To reproduce:
1. Select one grid item
2. Select another grid item
3. Tap again on the second grid item
4. The selection cannot be altered anymore, tapping on other rows does not change anything.

See example code below:

using Android.App;
using Android.Widget;
using Android.OS;
using System.Collections.ObjectModel;
using Syncfusion.SfDataGrid;
using Android.Views;

namespace App1
{
    [Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]
    public class MainActivity : Activity
    {

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            var view = FindViewById<LinearLayout>(Resource.Id.linearLayout1);
               var data = new MyDataCollection();
            SfDataGrid grid = new SfDataGrid(this);
               grid.ItemsSource = data.MyData;
            grid.SelectionMode = SelectionMode.Single;
            view.AddView(grid,800,500);
        }

    }

    public class MyDataCollection
    {
        ObservableCollection<MyDataClass> myData;

        public ObservableCollection<MyDataClass> MyData
        {
            get { return myData; }
            set { myData = value; }
        }

        public MyDataCollection()
        {
            myData = new ObservableCollection<MyDataClass>();
            GenerateData();
        }

        void GenerateData()
        {
            for (int i = 1; i <= 5; i++)
                myData.Add(new MyDataClass(i, "Name" + 1, new string(i.ToString()[0], 5), "Town" + i));
        }
    }

    public class MyDataClass
    {
        int id;
        string name;
        string zip;
        string town;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }
       
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
       
        public string Zip
        {
            get { return zip; }
            set { zip = value; }
        }

        public string Town
        {
            get { return town; }
            set { town = value; }
        }

        public MyDataClass(int id, string name, string zip, string town)
        {
            this.id = id;
            this.name = name;
            this.zip = zip;
            this.town = town;
        }

    }



}


The XML file:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:background="#255"
    android:minWidth="25px"
    android:minHeight="25px">
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_gravity="center"
        android:id="@+id/linearLayout1" />
</FrameLayout>


Dharmendar Dhanasekar [Syncfusion]
Replied On February 22, 2016 12:29 PM UTC

Hi Denis,

We have analyzed your query and we are able to reproduce the issue in our side. We have internally fixed this issue and the fix will be available in our upcoming service pack release. A support incident has been created under your account to track the status of this issue. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Regards,
Dharmendar


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

;