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.
Unfortunately, activation email could not send to your email. Please try again.

sgdategrid inside fragment

Thread ID:

Created:

Updated:

Platform:

Replies:

126087 Sep 22,2016 06:22 PM Sep 26,2016 02:17 AM Xamarin.Android 3
loading
Tags: SfDataGrid
Manos
Asked On September 22, 2016 06:22 PM

<LinearLayout
            p1:orientation="horizontal"
            p1:layout_height="match_parent"
            p1:id="@+id/layoutMainB"
            p1:weightSum="@integer/docsBLinearWeightSum"
            p1:paddingTop="@dimen/docsBLinearPaddingTop"
            p1:layout_width="match_parent">
            <GridLayout
                p1:id="@+id/layoutItemsB"
                style="@style/layoutItemsBStyle"
                p1:layout_height="wrap_content"
                p1:columnCount="4"
                p1:orientation="horizontal"
                p1:useDefaultMargins="false"
                p1:layout_marginRight="@dimen/docsBGridMargin"
                p1:layout_marginLeft="@dimen/docsBGridMargin"
                p1:layout_weight="@integer/docsBGridWeightSum">
                
...Here are Textview and Editext
             </<GridLayout>
...I like to load here as sfdatagrid. 
I tried to put a framelayout and load it from OnViewCreated (and also i tryied from OnCreateView) but the sfdatagrid appears without header columns and it seems not drawing correctly.
I also tried to add it in linear layout by setting new layoutparams with weight =1 and know the sfdatagrid appears correctly but not in the right position.

What im doing wrong? how can i use a sfdategrid inside fragment?

I forgot to mention tha the specific fragment used in viewpager
</<LinearLayout>

Ashok N [Syncfusion]
Replied On September 23, 2016 08:18 AM

Hi Manos,   
   
Thanks for contacting Syncfusion Support.   
   
We have checked your query and we were unable to reproduce issue. SfDataGrid have column header when we load SfDataGrid in framelayout and also SfDataGrid is layout in correct position when we set the LinearLayout.Weight = 1.  We have attached our tested sample in the sample link, please modify the same based on your requirement as it would be more helpful for us to proceed further.       
   
   
Regards,   
Ashok   


Manos
Replied On September 23, 2016 10:27 AM

I tried to load it dynamic inside fragment that hosts in viewpager. not from activity When i tried from activity it s work perfectly.
In example the line "SfDataGrid grid = FindViewById<SfDataGrid>(Resource.Id.main);" raise error about a constructor that its needed with parameters (Context context, global::Android.Util.IAttributeSet attrs) 
Where can i found the latest version?

Ashok N [Syncfusion]
Replied On September 26, 2016 02:17 AM

Hi Manos, 
 
We have prepared the sample by loading our SfDataGrid into ViewPager and SfDataGrid loaded properly. You can download the sample from the below location. 
 
Also you can get the our latest version of Xamarin Nuget (14.2.0.32) from the below link: 
 
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.

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.

;