473,661 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.ItemTem plate = ???

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
Nov 18 '05 #1
2 3118
This link will give u a good insite.
http://msdn.microsoft.com/library/de...platetopic.asp

Regards,
Jignesh Desai
www.dotnetjini.com

"Tigrou" <Ti****@discuss ions.microsoft. com> wrote in message
news:FD******** *************** ***********@mic rosoft.com...
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.ItemTem plate = ???

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

Nov 18 '05 #2
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
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4117
by: Craig Pennington | last post by:
I have many ASP pages that I cannot immediately convert to ASP.NET. I would like to make use of .NET, particularly C#, to develop new code that I would need to access from those unconverted pages. The new code would not use any control objects and would only be used in server-side ASP JavaScript code. Can I create a component in .NET and access it as an ActiveX component using "new ActiveXObject()" or "Server.CreateObject()"?
6
1966
by: ad | last post by:
I use the code to create a DataGrid and filled with data, But the DataGrid1 didn't display in WebForm. How can I display the DataGrid after creating it? DataGrid DataGrid1 = new DataGrid();
6
2291
by: Frank Wilson | last post by:
Tom, It sounds to me like ASP, not ASP.NET is handling the request for WebForm1.aspx. This is most likely an IIS config issue that may have been caused by order of installation or reinstallation, or possibly even something that happened in IIS before .NET was installed. Here is a way to prove or disprove my theory:
3
417
by: Richard Skopal | last post by:
In .NET Windows forms I can create a metafile using this code: Graphics grph = aControl.CreateGraphics(); IntPtr ipHDC = grph.GetHdc(); Metafile mf = new Metafile(aImgFilePath, ipHDC, EmfType.EmfOnly); grph.ReleaseHdc(ipHDC); grph.Dispose(); grph = Graphics.FromImage(mf); grph.DrawRectangle(aPen, 10, 10, 100, 120); grph.Dispose();
0
1085
by: tommy | last post by:
hello everybody, i haved read a few articles about, how to create controls in asp.net dynamically! i have tested it -- all works fine.... but....now it comes--> HOW create controls dynamically using a html-table.... i want to display dynamically on each row one button, and dont use datagrid.
6
1906
by: Shibu | last post by:
Hi, Can anyone tell me how to create a DSN from asp.net.. Thanks Shibu
0
893
by: Shapper | last post by:
Hello, I am creating a datagrid with 3 columns: image, title and price. I am having problems in doing the following: 1. In image column I want to display thumbnail images which url is in Dataset Image_URL field. 2. I need to set the width of each column. 3. I need the background color of each row to change when I move the mouse over it.
1
1129
by: gommca | last post by:
how to create menu bar in .net
0
1390
by: awu25 | last post by:
I have an ActiveX control for web created in .net 3.5. When upgrading the framework to 4.0 it stops working. I have tried to create a hello world activeX control with 4.0 and it wouldn't work either. Is it not possible to create ActiveX controls with .net framework 4.0? I have also tried to create windows form control for web but again it doesn't work.
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7364
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.