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.
Syncfusion Feedback

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

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?

Article ID: Published Date: Last Revised Date: Platform: Control:
7438 02/14/2017 02/14/2017 Xamarin.Forms SfDataGrid
Did you find this information helpful?
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
Add Comment
You must log in to leave a comment

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