Help with loading xml file in Grid using VB.NET

Hi,  

How do i load in xml file in a Grid's column using VB.NET? For example I need to select names listed in Name.xml to my Name colum and allow users to selet multiple names from a dropdown list.

Thanks,

Victor
vcharlesAsked:
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.

Fernando SotoRetiredCommented:
Hi Victor;

To your question, "How do i load in xml file in a Grid's column using VB.NET?", so if we are talking about a normal XML file, you can't.

To your statement, "I need to select names listed in Name.xml to my Name colum", Because you have a Name column then the DataGrid must have a schema and you will need to iterate through the list of names in the XML and manually insert it into the column.

To your statement, "allow users to select multiple names from a dropdown list.", OK, where did the DropDownList come from?
0
vcharlesAuthor Commented:
Hi Fernando,

Can it be done if the data is save yo a table? The data in the dropdownlist would come from the table instead of an xml file


Thanks

V.
0
Fernando SotoRetiredCommented:
Where is this DropDownList ? Is this a ComboBox in one of the GridCell.

Can you please take the time to describe what you want and if multiple controls are involved how they are to interact with each other please.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

vcharlesAuthor Commented:
Hi,

I would like to create a dropdown control inside the cell, when i click on down arrow in the cell display the data from the table/xml file, and display the files selected in the cell after making my selections. First part is ro be able to display a dropdown list when I click on a button  in the cell.

Thanks,

V.
0
Fernando SotoRetiredCommented:
Hi Victor;

The DataGridViewComboBoxColumn in a DataGridView does not support multi selection. So this will NOT allow users to select multiple names from ComboBox dropdown list.

You have a couple of options. Try and find a third party control which will support multiple selection in a dropdown list or you can extend the DataGridViewComboBoxColumn to support it and then you will need to do this, "Host Controls in Windows Forms DataGridView Cells", which will be a lot of work to get functionality.
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
vcharlesAuthor Commented:
Hi Fernando,

I'm sorry for the late reply.

Thank You.

Victor
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
.NET 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.