Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Display alternate text in datagrid

Reply
Thread Tools

Display alternate text in datagrid

 
 
Jason .
Guest
Posts: n/a
 
      05-11-2006
I have a datagrid that has a boundcolumn to my database:

<asp:BoundColumn DataField="IndustryPercentile" HeaderText="Industry"
DataFormatString="{0:###}%">
</asp:BoundColumn>

When a IndustryPercentile value is not available, the data returned is
-1. I would like to display "n/a" when the IndustryPercentile is -1.
How can I do this?



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      05-11-2006
Handle ItemDataBound event. If the cell text = "-1", replace it with "n/a".

Eliyahu

"Jason ." <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have a datagrid that has a boundcolumn to my database:
>
> <asp:BoundColumn DataField="IndustryPercentile" HeaderText="Industry"
> DataFormatString="{0:###}%">
> </asp:BoundColumn>
>
> When a IndustryPercentile value is not available, the data returned is
> -1. I would like to display "n/a" when the IndustryPercentile is -1.
> How can I do this?
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
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
what's 'alternate' in <link rel=alternate>? Chris ASP .Net 2 03-04-2007 04:45 PM
Alternate initializers or alternate class? transfire@gmail.com Ruby 10 07-17-2006 03:20 AM
ASP.NET 2.0 menu: where to set alternate text for "^ up one level =?Utf-8?B?ZHBvbXQ=?= ASP .Net 5 01-17-2006 02:30 AM
Mail problem: Inserting images without alternate text NorCalIC Firefox 4 08-11-2004 04:59 PM
Datagrid HeaderImageUrl - apply alternate text DotNetJunkies User ASP .Net 0 05-19-2004 09:19 PM



Advertisments