PC Review


Reply
Thread Tools Rate Thread

Change value of column in datagrid

 
 
=?Utf-8?B?a3NjZGF2ZWZs?=
Guest
Posts: n/a
 
      15th Mar 2005
I want to be able to ascertain the value in the cells of a column on a
datagrid and then change the value as follows:

If the value is " " I want the value displayed to be "N"

If the value is not " " I want the value to be "Y"

How do I accomplish this task?

Thanks,

Dave
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGVuZyBKaWU=?=
Guest
Posts: n/a
 
      15th Mar 2005
You can change it on ItemDataBound event.

if (e.Item.Cells[i].text=="")
{
e.Item.Cells[i].text="N";
}
else

"kscdavefl" wrote:

> I want to be able to ascertain the value in the cells of a column on a
> datagrid and then change the value as follows:
>
> If the value is " " I want the value displayed to be "N"
>
> If the value is not " " I want the value to be "Y"
>
> How do I accomplish this task?
>
> Thanks,
>
> Dave

 
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
How to change the style of a datagrid column KGriffin Microsoft VB .NET 0 4th Jan 2005 08:53 PM
change datagrid column color Dave Petersen Microsoft C# .NET 4 3rd Feb 2004 03:44 PM
How to Change Datagrid Column width Sean Microsoft VB .NET 3 23rd Dec 2003 05:52 PM
Conditionally Change a DataGrid Column Value... Amber Microsoft ASP .NET 0 7th Oct 2003 04:14 AM
Datagrid column font change Steven J. Reed Microsoft Dot NET Framework Forms 2 8th Sep 2003 06:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:14 AM.