Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Image Button in Datagrid WebControl

Reply
Thread Tools

Image Button in Datagrid WebControl

 
 
Alvin Bruney
Guest
Posts: n/a
 
      07-23-2003
in your itemdatabound or itemcreated event handler just add a label control
or any control that will take a url tag to the cell. then add the image to
the newly inserted control.

"Jim Mitchell" <> wrote in message
news:...
> Is there any way to put in image button in the datagrid. The button

column
> seems to have all the functionality, but does not have an img_url

property.
>
> Thanks in advance.
>
> Jim
>
>



 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      07-23-2003
sure you can put anything in there, even a jet plane...
this is for a hyperlink, substitute for your own user control.
//add a hyperlink for bogus results

HyperLink tb = new HyperLink();

tb.ForeColor = Color.Blue;

tb.Text = "Invalid";

tb.Font.Size = FontUnit.XXSmall;

tb.NavigateUrl = "Invalid.aspx";

e.Item.Controls[e.Item.Cells.Count - 1].Controls.Add(tb);

tb = null;

"Jim Mitchell" <> wrote in message
news:...
> I guess I did not know that you can just put controls (like the image
> control) into a cell on the datagrid. If you have a minute, can you let

me
> know how you would do that?
>
> Thanks,
>
> Jim
>
> "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
> message news:...
> > in your itemdatabound or itemcreated event handler just add a label

> control
> > or any control that will take a url tag to the cell. then add the image

to
> > the newly inserted control.
> >
> > "Jim Mitchell" <> wrote in message
> > news:...
> > > Is there any way to put in image button in the datagrid. The button

> > column
> > > seems to have all the functionality, but does not have an img_url

> > property.
> > >
> > > Thanks in advance.
> > >
> > > Jim
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      07-26-2003
Jim Mitchell wrote:
> I guess I did not know that you can just put controls (like the image
> control) into a cell on the datagrid. If you have a minute, can you
> let me know how you would do that?


Use a TemplateColumn. Look here:
http://aspnet.4guysfromrolla.com/articles/061002-1.aspx

--

Jos Branders


 
Reply With Quote
 
Jim Mitchell
Guest
Posts: n/a
 
      07-27-2003
Thanks, that was a nice link.


"Jos" <> wrote in message
news:...
> Jim Mitchell wrote:
> > I guess I did not know that you can just put controls (like the image
> > control) into a cell on the datagrid. If you have a minute, can you
> > let me know how you would do that?

>
> Use a TemplateColumn. Look here:
> http://aspnet.4guysfromrolla.com/articles/061002-1.aspx
>
> --
>
> Jos Branders
>
>



 
Reply With Quote
 
Justin Dutoit
Guest
Posts: n/a
 
      07-28-2003
You can put an <IMG> tag in the Text property as well.

Justin

"Jim Mitchell" <> wrote in message
news:O#NSg$#...
> Thanks, that was a nice link.
>
>
> "Jos" <> wrote in message
> news:...
> > Jim Mitchell wrote:
> > > I guess I did not know that you can just put controls (like the image
> > > control) into a cell on the datagrid. If you have a minute, can you
> > > let me know how you would do that?

> >
> > Use a TemplateColumn. Look here:
> > http://aspnet.4guysfromrolla.com/articles/061002-1.aspx
> >
> > --
> >
> > Jos Branders
> >
> >

>
>



 
Reply With Quote
 
Hrvoje Vrbanc
Guest
Posts: n/a
 
      08-11-2003
You could put it into Template Column.

Hrvoje


"Jim Mitchell" <> wrote in message
news:...
> Is there any way to put in image button in the datagrid. The button

column
> seems to have all the functionality, but does not have an img_url

property.
>
> Thanks in advance.
>
> Jim
>
>



 
Reply With Quote
 
Jim Mitchell
Guest
Posts: n/a
 
      08-23-2003
Is there any way to put in image button in the datagrid. The button column
seems to have all the functionality, but does not have an img_url property.

Thanks in advance.

Jim


 
Reply With Quote
 
Jim Mitchell
Guest
Posts: n/a
 
      08-23-2003
I guess I did not know that you can just put controls (like the image
control) into a cell on the datagrid. If you have a minute, can you let me
know how you would do that?

Thanks,

Jim

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:...
> in your itemdatabound or itemcreated event handler just add a label

control
> or any control that will take a url tag to the cell. then add the image to
> the newly inserted control.
>
> "Jim Mitchell" <> wrote in message
> news:...
> > Is there any way to put in image button in the datagrid. The button

> column
> > seems to have all the functionality, but does not have an img_url

> property.
> >
> > Thanks in advance.
> >
> > Jim
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make an HTML button look like WebControl command button jimryder@gmail.com ASP .Net 0 07-20-2006 08:05 AM
Trapping an Exception ocurring in a Webcontrol at the Page or parent WebControl level. ASP .Net 2 01-31-2005 06:34 PM
Can a webcontrol (webcontrol.dll) have a configuration file? Luis Ramírez. ASP .Net Building Controls 2 07-06-2004 04:35 PM
JavaScript Access to Button in form tags (webcontrol or html button) Wes Weems ASP .Net 1 07-20-2003 05:27 AM
Button Collection for Toolbar WebControl - Determinine which button was clicked Jim Mitchell ASP .Net Web Controls 0 07-12-2003 01:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57