473,666 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter dataset columns

SPG
Hi,

I need to be able to filter the columns that are visible through a dataset.
That is, I can have all columns in a dataset, but only some of them are
visible when filtered.

I know you can use rowfilter on a dataview. Is there anything like that I
can use?

Steve
Nov 16 '05 #1
1 8796
Hi,
I think that you mean datatable columns, not dataset columns.

You cannot filter columns as you filter rows, you have to go with a
workaround, you can create a new table with the column structure you need,
then using the DataColumn.Expr ession you can make reference to the original
table. Please make sure to include a FK relationship between both tables,
having the temp table as the child end, then Expression can be like
Parent.Name

Then you need to fill the table and you can use this new table as a "view".

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"SPG" <st************ *******@nopoo.b lueyonder.co.uk > wrote in message
news:IT******** ***********@new s-text.cableinet. net...
Hi,

I need to be able to filter the columns that are visible through a dataset. That is, I can have all columns in a dataset, but only some of them are
visible when filtered.

I know you can use rowfilter on a dataview. Is there anything like that I
can use?

Steve

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5183
by: Dan V. | last post by:
How can I use real SQL on a DataTable? i.e. not array of rows using a filter... as in DataTable.Select. I read at : microsoft.public.dotnet.framework.adonet "As others have posted: There is no SQL query processor for DataSets. You can use XPath with an XMLDataDocument built from the DataSet. You can also perform selections based on criteria, using the Find and Select methods, and you can create row filters using DataViews."
1
1739
by: werk | last post by:
For limiting access to the database to strictly necessary I try to filter the query by using DataView. Thw DataSet ds contains three columns (fields) : (LAND_ID, Landcode, Landnaam) and four rows. I try to filter out only one country (key is LAND_ID) with the following code: DataTable dt = ds.Tables; // ds contains the dataset of the query 4 rows
8
1507
by: ruca | last post by:
Hi gurus, How can I filter data in my DataSet and then put the result in a DataGrid? NOTE: I'm reading a txt file into a dataset with 3 columns: Id, Name, Age I have this: code------------------------------------------------------------------------
3
7890
by: jason | last post by:
I'll try to explain in detail what it is I'm struggling with. I created a SQL database with one table called CallSheet which contains the following columns: Caller ID: <--Primary Key, auto indexed by my SQL server From: Company: Status: Date: Phone Primary:
1
1855
by: John | last post by:
Hello, I am returning a dataset from a webservice that has two columns. Column two could have some return characters in it. Have can I filter them our prior to displaying in a datagrid? Thanks in advance. John
11
2132
by: Thomas A | last post by:
Hi, I fill a datgrid with data from a xml document, it works fine But.... Now I will to filter the data to the grid so only the data shows from the criteria that I set. My code now is very simple to fill the grid
1
1270
by: Engineerik | last post by:
dfjhsqd asked this earlier in the week and I have the same question. How can I apply a filter to the Master table when using two datagrids in a MasterDetail relationship?
2
8832
by: Anandan | last post by:
Hi, In our Project we use Dataset to load the Grid with Values. We have some criteria to filter the values to be shown in the Grid. For that we used the SELECT command to filter the Same Dataset. The SELECT Command we are using is as follows DS.Tables(0).Select("FieldName = '" & input value & "')
0
3243
JordanMartz
by: JordanMartz | last post by:
''' <summary> ''' Populates the DataGridView ''' </summary> Private Sub PopulateDataGridView() ' Set the column header names. userAccessGrid.ColumnCount = 5 userAccessGrid.RowsDefaultCellStyle.BackColor = Color.White userAccessGrid.RowHeadersVisible = True userAccessGrid.Name = "User Access Grid" userAccessGrid.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Raised
0
8449
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8360
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8556
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4371
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.