SfDataGrid content problem when using with SfTabView

Hi all,

I am a bit confused about using datagrid and tabview together. I want to use datagrid inside a tabview object but when I place a datagrid into the tabview, content is not shown, only blank white space is shown. I have no any problem If I use datagrid out of tabview, it works well and show all content that I want.

Edit: I am using version 16.1.0.26.

Here is my codes:

public partial class TestClass: ContentPage
{

        private SfTabView tabView;
        SfDataGrid sfGrid = new SfDataGrid();
        SfDataPager sfPager = new SfDataPager();


public TestMethod()
{

            sfGrid.Columns.Add(new GridTextColumn() { HeaderText = "Test1", MappingName = "Test1" });
            sfGrid.Columns.Add(new GridTextColumn() { HeaderText = "Test2", MappingName = "Test2" });
            sfGrid.Columns.Add(new GridTextColumn() { HeaderText = "Test3", MappingName = "Test3" });

            sfPager.PageSize = 10;
            sfPager.Source = modelData;
            sfPager.AppearanceManager = new DataGridPagerCustomization();

            sfGrid.ItemsSource = sfPager.PagedSource;
            sfGrid.ColumnSizer = ColumnSizer.Star;
            sfGrid.AllowSorting = true;
            sfGrid.AutoGenerateColumns = false;
            sfGrid.AllowResizingColumn = true;
            sfGrid.AllowSwiping = false;
            sfGrid.SelectionMode = SelectionMode.SingleDeselect;
            sfGrid.SelectionChanged += sfGrid_SelectionChanged;
            sfGrid.GridStyle = new DataGridCustomStyle();


            Grid myGrid = new Grid();
            myGrid.HorizontalOptions = LayoutOptions.FillAndExpand;
            myGrid.BackgroundColor = Color.WhiteSmoke;
            myGrid.Padding = new Thickness(0, 10, 0, 0);

            myGrid.RowDefinitions = new RowDefinitionCollection
            {
              new RowDefinition { Height = 50 },
              new RowDefinition {},
            };
            myGrid.Children.Add(sfPager, 0, 0);
            myGrid.Children.Add(sfGrid, 0, 1);


            tabView = new SfTabView();
            var tabItems = new TabItemCollection
            {
                new SfTabItem()
                {
                    Title = "Title1",
                    Content = myGrid
                },
            };

            tabView.Items = tabItems;
            this.Content = tabView;
}
}

9 Replies

VS Vishal Singh March 23, 2018 07:55 AM UTC

I am also facing the same issue, hope to get a reply soon.


SS Suhasini  Suresh Syncfusion Team March 23, 2018 11:42 AM UTC

Hi Tolgan / Vishal Singh, 
 
Thanks for contacting Syncfusion Support. 
 
When SfDataGrid is hosted in SfTabView, SfDataGrid is displayed, but rather when scrolling is performed in SfDataGrid, the rows and columns are not arranged correctly as expected. We are validating the defect to narrow down the cause for the issue. We will update you with the further details on or before 27th March 2018. We appreciate your patience until then.   
 
Regards, 
Suhasini  



TO Tolgahan March 23, 2018 11:50 AM UTC

Yes, data grid and data grid pager are displayed but rows are not displayed. I am waiting for good news.

Thank you.


VS Vishal Singh March 23, 2018 12:41 PM UTC

Can you attach a sample of what you can see the sfdatagrid working right now even with issue on scrolling? i am even not able to show it in any way


EH Eric Hamrick March 24, 2018 05:13 PM UTC

Hi,

I am having what I think is the same issue as well. I have 30 items in a list being bound to the datagrid inside a tabview.  Its only showing a subset of the items. If I scroll down it looks like there should be something displaying but it is blank.  I have attached my sample solution.  This is on 16.1.0.24. 

Eric



Attachment: DatagridInTabViewApp_9836fb81.zip


SS Suhasini  Suresh Syncfusion Team March 26, 2018 06:49 AM UTC

Hi Vishal, 
 
Thanks for your update. 
 
Please find the sample link below in which the issue is reproduced. In the sample, initially datagrid will be loaded, when scroll horizontally or vertically, rows and columns will not be loaded correctly as expected. 
 
 
Regards, 
Suhasini  



SS Suhasini  Suresh Syncfusion Team March 26, 2018 06:52 AM UTC

Hi Eric, 
 
Yes, we are able to reproduce the issue “When SfDataGrid is hosted in SfTabView and scrolling is performed, the rows and columns are not updated correctly as expected in SfDataGrid”. We are validating the defect to narrow down the cause for the issue. We will update you with the further details on or before 27th March 2018. We appreciate your patience until then.    
 
Regards, 
Suhasini  



SS Suhasini  Suresh Syncfusion Team March 28, 2018 03:56 AM UTC

Hi Vishal, 
 
We confirm that the issue “When SfDataGrid is hosted in SfTabView and scrolling is performed, the rows and columns are not updated correctly as expected in SfDataGrid” is a bug in SfTabView control. We are checking with the internal team on it, will provide you the further details based on the teams update. 
 
Regards, 
Suhasini  
 



VA Vinnalan Aravazhi Syncfusion Team March 29, 2018 04:03 AM UTC

Hi Vishal,

Thanks for the update.

We have checked the reported issue from our side and we are able to reproduce the reported issue from our side. Fix will be included our upcoming 2018 Vol 1 SP 1 release, which will be rolled out by the end of this month.

Regards,
Vinnalan K A.


Loader.
Up arrow icon