dynamic hyper link in datagrid
-
Any good example on how to create dynamic hyperlink column in datagrid .. also when I read data .. . i want PID couln to be hyper link and then pass that ID to next page
-
Any good example on how to create dynamic hyperlink column in datagrid .. also when I read data .. . i want PID couln to be hyper link and then pass that ID to next page
-
Any good example on how to create dynamic hyperlink column in datagrid .. also when I read data .. . i want PID couln to be hyper link and then pass that ID to next page
Hi, You can try out this... In the select statement add a dummy column as urlhref. This column will have the name of the page u want to call combined with the respective PID. For eg. if your table has two columns citycd and citydesc then write a select statement in this fashion.. select citycd, citydesc, 'webform1.aspx?c=' + citycd as urlhref from city. Now in datagrid columns, you must have made one column as hyperlink column. There is one property of the hyperlink column 'DataNavigateUrlField', which takes a field name of the datasource as its value and the datagrid uses this field for href tag for each row in the hyperlink column. So you can set this field DataNavigateUrlField='urlhref'. So now each row of your data grid's hyperlink column will have diffrent href as per the 'urlhref' column value. May be I am not able to give a perfact explaination but hope that it will help you... Chintan