dataset bind not all columns

B

brenny

Hi all

I'm using dataset and I'm filling datagrid with this dataset and my dataset
has 6 columns as "NAME","SURNAME","ADDRESS","TEL","BIRTHDAY" and "SCHOOL
NAME"

When I bind the dataset to datagrid,all columns are shown but I want to show
only three columns are "NAME","SURNAME" and "ADDRESS" and I don't want to
change dataset.

Dataset must have 6 columns but datagrid must have only 3 columns.

How can I accomplish this?
 
B

brenny

I couldn't find any property about columns.
May you give an example about this topic.

Thanks.
 
S

Sahil Malik [MVP]

Many ways to skin this cat. Here is one way.

Create a strongly typed ds to mimic the structure of your dataset. Mark that
as the datasource for the window data grid. Edit columns -mark the ones you
don't wish to see as Visible = false. Run the app - databind - bingo !!

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top