all groups > dotnet windows forms databinding > march 2005 >
You're in the

dotnet windows forms databinding

group:

How to add selected columns of a Dataset to a datagrid


How to add selected columns of a Dataset to a datagrid Neelakshi Joshi via .NET 247
3/16/2005 2:39:04 PM
dotnet windows forms databinding:
Hi,

I am using Visual Studio 2003. I was wondering how can I display only some of the columns of a dataset in a datagrid. For example, if my dataset has columns A,B,C,D and I want to display only columns A and C.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

Re: How to add selected columns of a Dataset to a datagrid Manohar Kamath
3/16/2005 5:04:15 PM
You will have to use a DataGridTableStyle and set add it to the grid's
tablestyle collection. E.g.

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

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com


[quoted text, click to view]
of the columns of a dataset in a datagrid. For example, if my dataset has
columns A,B,C,D and I want to display only columns A and C.
[quoted text, click to view]

AddThis Social Bookmark Button