Hi patrick
Thanks for your answer.
I have test that and I am quite surprise that the principle works fine..
But things needs to be clarify:
First of all doing like this adds an extra column in my datagrid with the
same content and the column which is in my dataset bound to the grid.
In other words I have 2 similar columns.
Is it possible to do that based on my already bound columns instead of
adding a new one ?
The second point is to know if there is a possiblity to catch the click
event on the link before it is postback to the server. This in a similar way
has the "CommandName" tag of the ButtonColumn ?
And as the last question, any idea why the previous solution was not working ?
"Patrick.O.Ige" wrote:
Try
<asp:HyperLinkColumn Text="Hyperlink Text"
DataNavigateUrlField="SomeDataSourceField"
DataNavigateUrlFormatString="mysample.aspx?ID={0}"
Target="_blank" />
Hope that helps
Patrick
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:25**********************************@microsof t.com... Dear all,
I have a datagrid which is populated with a dataset as follow:
myDataGrid.DataSource = ds.Tables(0)
myDataGrid.DataBind()
Then I need to create a Hyperlink column from my grid.Clicking on that lik
will pass the content of the click link to a page. For that I add the
following to my page :
<asp:HyperLinkColumn>
DataNavigateUrlField='<% "Event.aspx?ReelId=" & Container.DataItem("ID")
%>' </asp:HyperLinkColumn>
When running my application, I get an error message saying that the field
ID is not existing in the grid datasource.
Then I check the content of my dataset which is pass to the grid as
datasource by watching the content of ds.Tables(0).Columns(0) and the
name of that first column I am interresting in is "ID".
How do you explain that it cannot bind to the column in my dataset ?
What did I do wrong ??
Thnaks for your help
regards
serge