Create TemplateColumn for DataGrid in codebehind (vb.net) ?

G

Guest

Hello,

I'm searching for a solution who permit me to create an TemplateColumn in a
DataGrid into codebehind... I found only solution for create it into the ASPX
code...

My problem is to find a solution for add ImageButton controls into this
column, for now my code is:

Dim colSupp As New TemplateColumn
colSupp.ItemTemplate = ???

What is the right code for put ImageButton controls in this column, and how
set the properties of this ImageButton controls (for example the URL of the
image of this ImageButton). I'm looking for how manage all events of this
ImageButton controls, for exemple when a user click on this control...

Sorry for my english who not good.... but i hope you understand that i'm
looking for solution for create all my TemplateColumn into codebehind, not
the ASPX code...
After it i place my DataGrid into a PlaceHolder, like i really need dynamic
solution that's why i want do it only and at 100% into codebehind.

Thanks for your help ! :)
Tigrou
 
G

Guest

Thank you very much, i guess this link will be helpful for me !
If anyone know other way to do it i'm listenning for it of course ! it's
better to have 2 methods than one ! but thanks again for this link.

Regards,
Bye
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top