You can achieve this by using an ItemTemplate Column.
Example:
You want to pass and EmployeeID and EmployeeName to a javascript function from a datagrid.
In the HTML of the DataGrid
Code:
<asp:TemplateColumn HeaderText="Select">
<HeaderStyle CssClass="HEADERSTYLE"></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<a href='<%# GetClientSideChooseEmployeeFunction(DataBinder.Eval(Container,"DataItem.EmployeeID").toString(), DataBinder.Eval(Container,"DataItem.EmployeeName").toString()) %>'>Select</a>
</ItemTemplate>
</asp:TemplateColumn>
The GetClientSideChooseEmployeeFunction in the code behind
VB Code:
Public Function GetClientSideChooseEmployeeFunction(ByVal EmployeeID As String, ByVal EmployeeName As String) As String
Return "javascript:ChooseEmployee(""" & EmployeeID & """,""" & EmployeeName & """);"
End Function
Hope this helps.