in bound column hyper link will be possible?
-
Hi i am displaying some values in datagrid one boundcolumn, Like this: Ids: 1 2 3 4 5 Now in that paricular value only have to show in hyperlink, Ex: the 2 value have to show in hyperlink, its possible to show like that?, any one have idea abt this?,
Thanks & Regards, Mageshh, please don't forget to vote on the post
-
Hi i am displaying some values in datagrid one boundcolumn, Like this: Ids: 1 2 3 4 5 Now in that paricular value only have to show in hyperlink, Ex: the 2 value have to show in hyperlink, its possible to show like that?, any one have idea abt this?,
Thanks & Regards, Mageshh, please don't forget to vote on the post
try this in RowDataBound event of grid.
if (condition) { HyperLink hypLink = new HyperLink(); hypLink.Text = "Click Here"; hypLink.NavigateUrl = "Default.aspx"; e.Row.Cells[0].Controls.Add(hypLink); }
Arun J
-
try this in RowDataBound event of grid.
if (condition) { HyperLink hypLink = new HyperLink(); hypLink.Text = "Click Here"; hypLink.NavigateUrl = "Default.aspx"; e.Row.Cells[0].Controls.Add(hypLink); }
Arun J
Hi i am using vs2003, u given for vs2005, the same code will be work on item bound?
Thanks & Regards, Mageshh, please don't forget to vote on the post
-
Hi i am using vs2003, u given for vs2005, the same code will be work on item bound?
Thanks & Regards, Mageshh, please don't forget to vote on the post
yes it will work.
-
Hi i am using vs2003, u given for vs2005, the same code will be work on item bound?
Thanks & Regards, Mageshh, please don't forget to vote on the post
Use it in Itembound and instead of row use
Item
Arun J
-
Use it in Itembound and instead of row use
Item
Arun J
Hi i used itemcommand , but i am not getting link this is my code: Private Sub dglocal_itemdbound(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dglocal.ItemDataBound If e.Item.Cells(0).Text = "00:00" Then Dim hplink As HyperLink hplink.Text = e.Item.Cells(0).Text hplink.NavigateUrl = "frmTravelExpDetails.aspx" e.Item.Cells(0).Controls.Add(hplink) End If End Sub whats wrong in that?,
Thanks & Regards, Mageshh, please don't forget to vote on the post
-
Hi i used itemcommand , but i am not getting link this is my code: Private Sub dglocal_itemdbound(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dglocal.ItemDataBound If e.Item.Cells(0).Text = "00:00" Then Dim hplink As HyperLink hplink.Text = e.Item.Cells(0).Text hplink.NavigateUrl = "frmTravelExpDetails.aspx" e.Item.Cells(0).Controls.Add(hplink) End If End Sub whats wrong in that?,
Thanks & Regards, Mageshh, please don't forget to vote on the post
Compare with this,
protected void dGrid_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { HyperLink hypLink = new HyperLink(); hypLink.Text = e.Item.Cells[0].Text; hypLink.NavigateUrl = "Default.aspx"; e.Item.Cells[0].Controls.Add(hypLink); } }
Arun J