|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to use hyper columns in datagridI have set the configuration as the attchment jpg file
however,when i click the hyper link , it only show the url as below: http://localhost/content.aspx?key_word= even I have chosen the url field is "word" which is a data column in my datagrid And I want to url output as: http://localhost/content.aspx?key_word=value where value = the value of the word in the datagrid? thx you for your help You can code in DataGrid_ItemDataBound event:
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView drv = (DataRowView)e.Item.DataItem; HyperLink link = (HyperLink)e.Item.Cells [link_col_index].Controls[0]; link.NavigateUrl = "http://localhost/content.aspx? key_word=" + drv["word"]; } HTH Elton Wang elton_w***@hotmail.com >-----Original Message----- url as below:>I have set the configuration as the attchment jpg file > >however,when i click the hyper link , it only show the >http://localhost/content.aspx?key_word= data column in my> >even I have chosen the url field is "word" which is a Show quoteHide quote >datagrid > > >And I want to url output as: >http://localhost/content.aspx?key_word=value >where value = the value of the word in the datagrid? > >thx you for your help > > >. >
Howto insert delete rows into a ASP.net datagrid?
read row values from datagrid and populate in new datagrid values from connected Datagrid Paging Stretch Data Programmatically Rotate Datagrid Rows Datagrid paging keeps going back to the first group Accessing data object on delete command. MessageBox not showing before Response.Redirect ItemDataBound Slow datagrid on postback filtering from multiple dropdownlists |
|||||||||||||||||||||||