Print Page | Close Window

Datagrid BoundColum - Showing different t

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=2570
Printed Date: 28 March 2026 at 5:59pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Datagrid BoundColum - Showing different t
Posted By: pnp!
Subject: Datagrid BoundColum - Showing different t
Date Posted: 09 May 2003 at 8:49pm


I want to make a boundcolumn in a datagrid, binding a "bit" (a boolean, true or false) row.
Ie:

<asp:BoundColumn DataField="Impreso" HeaderText="Status"></asp:BoundColumn>

But, when the row is 'false' I want to show the word "OK" in the screen (in the datagrid)
And when the row is 'true' I want to show the word "BAD".

Do someone know how can I do it? (or know where I can find some article to take a look?).

Thanks in advance.




Replies:
Posted By: Bunce
Date Posted: 10 May 2003 at 1:39am

You'd need to either bind to a different field (which contains 'OK or 'BAD', or use a template column and write your own function to alter the output.

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: pnp!
Date Posted: 12 May 2003 at 9:24am

Ok. Thanks very much for the info.

What I want to know is HOW can I make the templatecolumn in order to write the input.

Thanks!...



Posted By: Bunce
Date Posted: 12 May 2003 at 4:36pm

ok.  what tool are you using to write your code??  Are you using code-behind? What language?

In the mean time, here are a couple of sites related to the datagrid:
http://www.datagridgirl.com - http://www.datagridgirl.com
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx - http://aspnet.4guysfromrolla.com/articles/040502-1.aspx

There are also a couple of videos from http://www.learnvisualstudio.net - http://www.learnvisualstudio.net which cover this topic thatI could send you. (If anyone wants to join, feel free to list me as your referrer!! )

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net