Re: Displaying Select columns(windows forms app) by Phuff
Phuff
Tue Sep 27 12:05:41 CDT 2005
the problem is that I need only certain columns.
Here it is:
Someone gives me an address list. This could be in any format, but I
need it to be Name, Addr1, Addr2, City, State, Zip. The list could
come from realtors so it might have home worth, etc. I have a control
that allows them to use some check boxes and other various stuff to
describe their data(ie. this column is the Full Name column, or this is
the First Name and this is teh Last Name). I then create based off
their selection. If full name it just goes into a column called
OutputName. If first and last names OutputName is created using First
Name column and last name so on and so forth.
This all works great, I now have a dataset that has the old information
with the new columns appended at the end. I will need to loop through
this dataset and pull out the correctly structure data to fill a custom
Address object in another part of the program. I also need to display
only the newly organized data in a datagrid so that the user may verify
they mapped their data correctly. (This is a must as it could be a
200, 500, 5000 - who knows- person list and they will be printing to
this list. If they mapped incorrectly they would still be charged even
though the mailings would have incorrect addressing formats, which
would probably mean a loss of a customer) I figured the easiest way to
do this is to create a new dataset based off the original, to
accomplish both of my previously stated goals. I have no idea how to
do this in Ado.net. Is it even possible? I wish I could do some SQL
statements against a dataset, lol.
So its not certain records, but certain fields(columns) that I need.
Let me know if I need to clarify further, thanks.