Problems passing values to a HyperlinkColumn
Hey guys, I am using BoundColumn and HyperlinkColumns to create a datagrid.
I have two boundColumns that provides me two values.
I am trying to pass those two values to the Hyperlinkcolumn to pass it as a querystring into a model window.
Note: I am doing this programmatically and have no HTML view to add a template.
Code:
For i = 0 To myDataSet.Tables(0).Columns.Count - 1
Dim dgColumn As New BoundColumn
Select Case myDataSet.Tables(0).Columns(i).ColumnName
Case "id"
dgColumn.HeaderText = "Id"
dgColumn.DataField = myDataSet.Tables(0).Columns(i).ColumnName
dgWorkflow.Columns.Add(dgColumn)
Case "name"
dgColumn.HeaderText = "Name"
dgColumn.DataField = myDataSet.Tables(0).Columns(i).ColumnName
dgWorkflow.Columns.Add(dgColumn)
End Select
Next
Dim dgHColumn As New HyperlinkColumn
dgHColumn.Text = "View"
dgHColumn.NavigateUrl = "Javascript: alert('value1/value2')
How can i have each value in in row to be passed into the link.
If some one know how to work with iTemplate, may be they can give me a snipet to get me going...
Thanks,
Shrini
|