Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Datagrid BoundColum - Showing different t
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Datagrid BoundColum - Showing different t

 Post Reply Post Reply
Author
pnp! View Drop Down
Newbie
Newbie


Joined: 04 October 2002
Location: Argentina
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote pnp! Quote  Post ReplyReply Direct Link To This Post Topic: Datagrid BoundColum - Showing different t
    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.

Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post 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



Edited by Bunce
There have been many, many posts made throughout the world...
This was one of them.
Back to Top
pnp! View Drop Down
Newbie
Newbie


Joined: 04 October 2002
Location: Argentina
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote pnp! Quote  Post ReplyReply Direct Link To This Post 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!...

Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post 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://aspnet.4guysfromrolla.com/articles/040502-1.aspx

There are also a couple of videos from 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



Edited by Bunce
There have been many, many posts made throughout the world...
This was one of them.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.