Binding a DataGrid to an empty Dataset in vb.net

I have a Dataset with x columns but no rows, I want to bind this to a Datagrid and so the user can start populating the dataset.

If i just set the datasource of the datagrid to the empty dataset, the colums dont show up and i cant add any rows.

Thanks in advance

mark
mark_w_Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pratap_rCommented:
check the properties of the datagrid, do you see a + sign at the first column?, expand it and you will get the place to add the new row.

make sure you have set RowHeadersVisible property to true.

or simply bind the datatable to the datagrid instead of the dataset

Have Fun!
Pratap
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mark_w_Author Commented:
Yeah sorry the dataTable is bound to the datagrid using the following line

 Me.dgMeta.SetDataBinding(dsLocalData, "MCSTable")


I dont get a any of the column headers shown even though i have their visible properties to to true.

is it not showing them cos i dont have any data in the dataset??

all i get is the row column headings, the first row heading is the one that would be in the top left inline  with the column headings and the next one is where the new row would be if there were any columns.

mark
0
mark_w_Author Commented:
All sorted,

Was due to a poor bit of coding on my part,

Thanks for your help though.

Mark
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.