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

How to add multiple views in a grid cell in SfDataGrid?

Platform: Xamarin.Forms |
Control: SfDataGrid |
Published Date: February 14, 2017 |
Last Revised Date: February 14, 2017

You can add multiple views in a grid cell in SfDataGrid using the GridTemplateColumn. You can load any number of views in GridCell by customizing the CellTemplate property of the GridTemplateColumn.

The below code illustrates how to add multiple views in a grid cell by customizing the CellTemplate property of a GridTemplateColumn.

 

 

On executing the above code the below output is obtained.

 

Sample Link:

How to add multi-line texts in SfDataGrid grid cells?

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
Balakrishnan
Oct 16, 2017

this is not working, It is populating the first row alone, Can you add the sample project you have.

Thanks


Reply
Balakrishnan
Oct 16, 2017

Do we have to explicitly set the row hight RowHeight="180" then only it is working.

Reply
Harikrishnan N [Syncfusion]
Oct 16, 2017

Hi Balakrishnan,

You can customize the row height of the grid rows based on its content by handling the SfDataGrid.QueryRowHeight event. 
UG link: https://help.syncfusion.com/xamarin/sfdatagrid/row-height-customization

You can also auto fit the content of the grid rows based on its content. Refer the below UG links for more details. 

https://help.syncfusion.com/xamarin/sfdatagrid/row-height-customization#customize-rowheight-for-all-rows 
https://help.syncfusion.com/xamarin/sfdatagrid/row-height-customization#gridrowsizingoptions 

Regards,
Harikrishnan 

Reply
Ajay
Nov 08, 2017

How can we bind sfDataGrid, when i run the solution after this implementations it shows nothing in screen (it shows blank screen).

Thanks..

Reply
Pavithra  Sivakumar [Syncfusion]
Nov 09, 2017

Hi Ajay,

 

We have checked the attached sample in all the three platforms. The reported issue is not replicated from our side. Ensure that you have bound the itemsource  in SfDataGrid. If you bind a null value, then SfDataGrid will show blank. In case, if the issue still persists, then please create an support incident for the same. We will be happy to help you.

 

Regards,

Pavithra S

 

Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon