hi to all
I am using gridview in my application. in that i assign the data(dataset) dynamically to gridview. i want how to make the columns values as hyperlink.(i want to make that column as template field) at runtime.
Loading
hi to all
I am using gridview in my application. in that i assign the data(dataset) dynamically to gridview. i want how to make the columns values as hyperlink.(i want to make that column as template field) at runtime.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
abhishek trivediPosted Aug 1, 2007, 7:45 AM
you want your data as an hyperlink ok?
Iit is verry simple !
first of all set autogeneratedcolumn = false of gridview control.
then then create columns inside gridview control in markup file of your page then under the column create item template and under item template create hyperlink button and set its text = '<%# Eval=("database field name") %>
or you can also add bound filed to gridview control and then follow from above step2.
you have 2 way.
you will have your job done.
Best of Luck
Munir ShaikhPosted Jul 30, 2007, 6:20 AM
<
Columns><asp:HyperLinkField HeaderText="" Text="" DataNavigateUrlFields="" DataNavigateUrlFormatString="" />
Where
1. HeaderText will act as Column Text
2. Text will act text to appear in the row-wise column
3. DataNavigateUrlFields will be acting database field
4. DataNavigateUrlFormatString where you can put your link to go to specific code where you can also append query string
Regards,
>>Munnamax