Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Reformatting data in datagrid column

Reply
Thread Tools

Reformatting data in datagrid column

 
 
flashgorman
Guest
Posts: n/a
 
      10-01-2003
Hi,

I have a datagrid column which is bound to a database boolean field which is
always 0 or 1. What I want to do is show the words "on" or "off" in the
column rather than the actual 0 or 1 value. Is this possible?

TIA

--
Flash Gorman.
www.flashgorman.com


 
Reply With Quote
 
 
 
 
ShamusFu
Guest
Posts: n/a
 
      10-01-2003
Are you using Visual Basic?

If so, you can use the IIF function.

If not, you can write a code-behind subroutine and pass it the boolean
value.


"flashgorman" <(E-Mail Removed)> wrote in message
news:blehju$b2ldv$(E-Mail Removed)-berlin.de...
> Hi,
>
> I have a datagrid column which is bound to a database boolean field which

is
> always 0 or 1. What I want to do is show the words "on" or "off" in the
> column rather than the actual 0 or 1 value. Is this possible?
>
> TIA
>
> --
> Flash Gorman.
> www.flashgorman.com
>
>



 
Reply With Quote
 
 
 
 
flashgorman
Guest
Posts: n/a
 
      10-02-2003

"ShamusFu" <(E-Mail Removed)> wrote in message
news:OISQ0%(E-Mail Removed)...

> "flashgorman" <(E-Mail Removed)> wrote in message
> news:blehju$b2ldv$(E-Mail Removed)-berlin.de...
> > Hi,
> >
> > I have a datagrid column which is bound to a database boolean field

which
> is
> > always 0 or 1. What I want to do is show the words "on" or "off" in the
> > column rather than the actual 0 or 1 value. Is this possible?
> >
> > TIA


> Are you using Visual Basic?
>
> If so, you can use the IIF function.
>
> If not, you can write a code-behind subroutine and pass it the boolean
> value.
>

Cheers. I'm not using VB so I'll look into the code behind business.


 
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
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu ASP .Net 1 03-25-2006 01:24 PM
how do i access a dropdownlists selected value in a datagrid edititemtemplate column from the selectedindexchanged event of another dropdownlist in a datagrid edititemtemplate column Dave M ASP .Net Datagrid Control 0 12-14-2004 11:53 AM
Activa or not activate a button column depending if another data column has data or not carlos perez ASP .Net 0 06-08-2004 02:16 PM
Add column to the last column of Datagrid Hai Nguyen ASP .Net 0 01-16-2004 10:10 PM
How to bind a db image column (byte array) to a datagrid column? Jim Hammond ASP .Net 1 11-26-2003 12:55 AM



Advertisments