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

is it possible to edit GridHyperlinkColumn ?

Hi, I have an sfDatagrid with a GridHyperlinkColumn column.
I would like the user can edit a cell of this type in the gird when he double clicks it (and edits it).
But I also would like he can browse to the link contained in the cell if he simply clicks the cell without editing it.

Is it possible to implement such a behaviour ?

Silvio

1 Reply

SV Srinivasan Vasu Syncfusion Team March 21, 2016 12:10 PM UTC

Hi Silvio,

We have analyzed your query. You can achieve your requirement using GridTextColumn where you have to load Hyperlink in display using GridTextColumn.CellTemplate and you have to set SfDataGrid.EditTrigger as DoubleTap like the below code example. We have created a  sample based on this and you can download the sample from the below location,

Code:

<syncfusion:GridTextColumn  AllowEditing="True"  MappingName="Country">

                    <syncfusion:GridTextColumn.CellTemplate>

                        <DataTemplate>

                            <ContentControl>                                      

                                <Hyperlink NavigateUri="{Binding Country}" RequestNavigate="Hyperlink_RequestNavigate">                                                                    

                                        <TextBlock  Text="{Binding Country}"/>                                                                               

                                </Hyperlink>

                            </ContentControl>

                        </DataTemplate>

                    </syncfusion:GridTextColumn.CellTemplate>

                </syncfusion:GridTextColumn>


Sample: http://www.syncfusion.com/downloads/support/forum/123460/ze/Samples-855818289

Please let us know if you require further assistance on this.

Regards,
Srinivasan


Loader.
Up arrow icon