PC Review


Reply
Thread Tools Rate Thread

datagrid column question

 
 
=?Utf-8?B?b3NjYXI=?=
Guest
Posts: n/a
 
      12th Apr 2005

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.
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      12th Apr 2005
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/de...ssiontopic.asp

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



> 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.
>




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Datagrid Column Question =?Utf-8?B?TWFyYw==?= Microsoft Dot NET 0 19th Apr 2005 01:34 PM
datagrid column question Jon Microsoft ASP .NET 0 17th Jan 2005 01:50 PM
Datagrid column question. JenHu Microsoft ASP .NET 3 14th Jan 2005 04:01 PM
DataGrid column button Question =?Utf-8?B?QnJpYW5ESA==?= Microsoft VB .NET 0 23rd Nov 2004 04:31 PM
DataGrid Column Delete Question Duncan Microsoft C# .NET 1 10th Oct 2003 03:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:58 AM.