5
Answers

Changing Bound Column to HyperLink Column

livezone

livezone

20y
1.9k
1
Hi, My datagrid has AutoGenerateColumn=True as same grid is used to display different data based on user selection. For certain output, I want to change one of the column to be a hyperlink column instead of bound column as I am guessing autogeneratecolumn will create all bound columns How can change this using code? Thanks Shafiq
Answers (5)
0
david 0

david 0

NA 190 0 20y
A simple check of the columns collection will take care of THAT!
0
livezone

livezone

NA 5 0 20y
But can you condition this column to display only if the datasource has that column available. As my datasource may or may not have that column depending upon user selection. Thanks Shafiq
0
david 0

david 0

NA 190 0 20y
AutoGenerate will creaate columns in the grid for all columns in the datasource which do not match up with defined columns in the grid. Thus if you explicity set the information for a specific column the way you want it will already exist and autogenerate will not duplicate it.
0
livezone

livezone

NA 5 0 20y
I think if you are saying AutoGenerateColumns=True then there is no reason to specify the . They will be automatically generated. Problem is once they created or during Item_Created event , somehow change them to Hyperlink column. Thanks
0
imranzubair

imranzubair

NA 3 0 20y
Yes you can do it. ......... ........etc