Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datagrid - Conditional Buttons/links

Reply
Thread Tools

Datagrid - Conditional Buttons/links

 
 
bijoy
Guest
Posts: n/a
 
      03-21-2005
My datagrid displays the following info: Date, Expected Users, Number
of Events

I want it to behave as follows:

For each row, if the value of Expected Users is greater than 5000, then
I display the value in RED and make it a link. Otherwise just display
the text in regular font. The link should fire a server-side event. I
will use this to display additional information on the page about the
clicked item.

The text in RED part was easy..

How do I go about displaying conditional links that trigger a server
side event?

Bijoy

 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      03-22-2005
Hi bijoy,

You can add both LinkButton Lable in a TemplateColumn.
Then in datagrid_ItemDataBound event according to your
condition set only one of them visible. The linkButton can
fire datagrid_ItemCommand event.

HTH

Elton Wang
http://www.velocityreviews.com/forums/(E-Mail Removed)


>-----Original Message-----
>My datagrid displays the following info: Date, Expected

Users, Number
>of Events
>
>I want it to behave as follows:
>
>For each row, if the value of Expected Users is greater

than 5000, then
>I display the value in RED and make it a link. Otherwise

just display
>the text in regular font. The link should fire a server-

side event. I
>will use this to display additional information on the

page about the
>clicked item.
>
>The text in RED part was easy..
>
>How do I go about displaying conditional links that

trigger a server
>side event?
>
>Bijoy
>
>.
>

 
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
how do you add conditional statement to datagrid TemplateColumn Giorgio ASP .Net 1 07-21-2005 09:55 AM
Re: conditional hyperlink in datagrid Joe Fallon ASP .Net 0 07-12-2005 10:44 PM
Re: conditional hyperlink in datagrid John Timney \(ASP.NET MVP\) ASP .Net 0 07-12-2005 10:36 PM
? ELSE Conditional Comment / Using Conditional Comments Inside Other Tags To Comment Out Attributes Alec S. HTML 10 04-16-2005 02:21 AM
Conditional Formatting of HyperLink on Datagrid chuckdfoster ASP .Net 3 03-09-2005 10:20 PM



Advertisments