469,626 Members | 1,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

DataView Columns

Hi NG,

how to make a DataView show only selected COLUMNS?

E.g:
DataTable table // is already in memory and has two columns: "id" and
"value"
DataView view // should only show all rows from "value"
TIA,
KN

x-post & f'up to .adonet
Nov 17 '05 #1
2 1464
Hi Karl,

Please try this:
MyDataView.Table.Columns.Remove("ColumnName")

Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
From: "Karl Napp" <ka**********@gmxSPAM.li>
Subject: DataView Columns
Date: Fri, 31 Oct 2003 18:40:33 +0100
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <Oh**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.adonet,microsoft .public.dotnet.framework.a
spnet NNTP-Posting-Host: pd95301f9.dip.t-dialin.net 217.83.1.249
Path: cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!TK2MSFTNGP09.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:187837
microsoft.public.dotnet.framework.adonet:65012 X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi NG,

how to make a DataView show only selected COLUMNS?

E.g:
DataTable table // is already in memory and has two columns: "id" and
"value"
DataView view // should only show all rows from "value"
TIA,
KN

x-post & f'up to .adonet


Nov 17 '05 #2
Thank you Mike,
how to make a DataView show only selected COLUMNS?
Please try this:
MyDataView.Table.Columns.Remove("ColumnName")


but this really removes the column from the underlying table!
KN
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Phil Townsend | last post: by
8 posts views Thread by Dave Hagerich | last post: by
8 posts views Thread by KC | last post: by
3 posts views Thread by Catullus | last post: by
reply views Thread by Nathan Franklin | last post: by
1 post views Thread by Richard Jonker | last post: by
2 posts views Thread by =?Utf-8?B?UmljaA==?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.