HyperLinkColumn

F

Franck Diastein

Hi,

I create from my CS code an HyperLinkColumn, and add it to a DataGrid
before binding data...

Then, I need to use text from that Column in ItemDataBound...

I do this:

e.Item.Cells[2].Text = e.Item.Cells[0].Text + "MyStuff";

the problem is that my Cell 2 only shows MyStuff instead of cell's 0
text AND MyStuff...

I think the problem cames from the fact that I create 'source' cell by
code, but I can't do it another way...

Any idea ?

TIA
 
G

Guest

Are you sure that cells[0].text has what you want at itemdatabound (i.e.
you've set a breakpoint to check)? Depending on how you built that column you
might need to look at the controls collection within the cell.

Bill
 
I

intrader

Hi,

I create from my CS code an HyperLinkColumn, and add it to a DataGrid
before binding data...

Then, I need to use text from that Column in ItemDataBound...

I do this:

e.Item.Cells[2].Text = e.Item.Cells[0].Text + "MyStuff";

the problem is that my Cell 2 only shows MyStuff instead of cell's 0
text AND MyStuff...

I think the problem cames from the fact that I create 'source' cell by
code, but I can't do it another way...

Any idea ?

TIA
Why are you posting twice? Both previous answers seem to be correct
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,131
Latest member
IsiahLiebe
Top