Groups | Blog | Home
all groups > dotnet faqs > march 2004 >

dotnet faqs : About datagrid


Nicholas Paldino [.NET/C# MVP]
3/18/2004 11:47:52 PM
zhimin,

In order do to this (assuming you are using the DataGrid in
System.Windows.Forms), you will have to create a class derived from
DataGridColumnStyle which will show Yes or No depending on the value in the
table. Once you have that, you have to add the column to the grid (through
the table styles, then the column styles itself).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

[quoted text, click to view]

Miha Markic [MVP C#]
3/19/2004 9:21:46 AM
Hi,

As another solution you might utilize Binding.Format event (see .net help
for example).

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

[quoted text, click to view]

zhimin
3/19/2004 10:14:41 AM
Hi
There is a column named IsInUsing which data type is bit in my database(MS
SQL Server 2000). I want to show this column in a datagrid by setting
SqlDataAdapter in GUI design.

But the result of this column shown is true or false, it should shown the
string Yes or No in my idea.

Thanks!

AddThis Social Bookmark Button