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. Image for the cookie policy date

GridHyperlinkColumn wrap text

Hi,
How can I make "GridHyperlinkColumn" column to wrap text?

3 Replies

FP Farjana Parveen Ayubb Syncfusion Team May 4, 2015 12:48 PM UTC

Hi Vasanth,

Thank you for contacting Syncfusion support.

We analyzed your query. Currently, we don’t have a direct support for TextWrapping in GridHyperlinkColumn in SfDataGrid. But we have prepare the workaround based on your requirement by overriding the GridCellHyperlinkRenderer in SfDataGrid.

Please refer the following code snippet and sample in the following location:

Code Snippet:

public class GridHyperlinkColumnExt : GridCellHyperlinkRenderer

{

public GridHyperlinkColumnExt()

{


}


public override void OnInitializeEditElement(Syncfusion.UI.Xaml.ScrollAxis.RowColumnIndex rowColumnIndex, HyperlinkButton uiElement, GridColumn column, object dataContext)

{

base.OnInitializeEditElement(rowColumnIndex, uiElement, column, dataContext);

TextBlock textblock = uiElement.Content as TextBlock;

textblock.TextWrapping = Windows.UI.Xaml.TextWrapping.Wrap;

}

}

Sample Location: SfDataGridWithHyperLinkColumn.zip

Regards,

Farjana Parveen A




VA Vasanth May 4, 2015 02:16 PM UTC

Perfect, thanks!


SC Saranya CJ Syncfusion Team May 5, 2015 06:45 AM UTC

Hi Vasanth,

Thank you for your update. Please let us know if you require further assistance on this.

Regards,
Saranya

Loader.
Live Chat Icon For mobile
Up arrow icon