Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2005

Tip: Looking for answers? Try searching our database.

datagrid column question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
oscar - 12 Apr 2005 15:37 GMT
is there a way to make an if statement for a datagrid column?  

i am currently filling a dataset from a mysql database and then putting it
into the datagrid.  one of the fields is "Status" and it has a 0 for Active
and a 1 for Inactive.  is there any way to make the datagrid display Active
or Inactive instead of 0 or 1 without creating a datatable and importing the
dataset to a datatable?  the dataset has about 5,000 records and takes to
long to create a datatable.

thanx in advance.
Brock Allen - 12 Apr 2005 17:14 GMT
Yes, if you're using a DataSet. Add a new column to the DataTable and set
the Expression column. You can use access-like syntax in here, including
an IIF statement (if and only if). Check the docs on the allowed syntax (it's
quite decent):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemdatadatacolumnclassexpressiontopic.asp


-Brock
DevelopMentor
http://staff.develop.com/ballen

> is there a way to make an if statement for a datagrid column?
>
[quoted text clipped - 6 lines]
>
> thanx in advance.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.