How to add hyperlink and pass values in Grid

Cannot provide example as the forum edits the code.... 
I can do the above in ASP.Gridview by using the HyperlinkField and passing values in the DataNavigateURLFields.
How to do this in Grid? Cannot fund complete documentation.
Paul


1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team December 8, 2017 04:55 PM UTC

Hi Paul, 

Thanks for contacting Syncfusion Support. 

We have achieved your requirement “add HyperLink column and pass values in Grid” using column Template feature of the Grid.  By using  column Template we can place hyperlink using Template property and also pass the required parameters to the server side as like below code example. 

<ej:Grid runat="server"ID="OrdersGrid" AllowPaging ="True"> 
     <Columns> 
          <ej:Column HeaderText="HyperLink" Template="<a rel='nofollow' href='//www.syncfusion.com/?OrderID={{:OrderID}}'>Click Me</a>" TextAlign="Center" /> 
          <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="75" /> 
              . . .  . 
                    
      </Columns> 
</ej:Grid>                 

Refer to the screenshot:- 

 

Please refer to the sample:- 

Refer to the documentation and online Demo Link:- 



Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 


Loader.
Up arrow icon