Binding XML dataset to datagridview

Hi all, I'm quite a bit of a newbie to this v.b express but I'm slowly learning. Ok here's my problem : I'm trying to turn a textfile into a database ( or dataset -it will only have 1 table) .

 Now after reading up a bit it seems like the only way I can do it is to turn the textfile into a XML dataset using the  writeXMLschema and writeXml commands, which I've figured out how to do so I end up with 2 XML files, but I cant seem to figure out how to attach it to a bindingnavigator bar.

 Thanks in advance for any help.

 

 



Answer this question

Binding XML dataset to datagridview

  • Jack Stephenson

    hi,

    you allready have the dataset so you have to creat a bindingSource that you will bind your data to the datagridview and the bindingnavigator will control the displaied records in the datagridview it will be easier if you added a bindingnavigator from tool under datatab

    Dim mybindingsource As New BindingSource

    mybindingsource.DataSource = Mydataset

    mybindingsource.DataMember = ("mytablename")

    DataGridView.DataSource = mybindingsource

    BindingNavigator1.BindingSource = MyBindingSource

    hope it was helpfull



  • Binding XML dataset to datagridview