Results 1 to 3 of 3

Thread: Datagrid problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    7

    Datagrid problem

    Hi,
    I have a datagrid which is bound to a dataset's datatable. my datasource is a xml file. I can display everything in the datagrid, i.e i can read from the xmlfile and write to xml file, but the problem is , if i change a cell value in datagrid, how can i reflect the changes back to dataset. I want my dataset to be updated everytime the user leaves the datagrid.
    Can anyone help me out with this

  2. #2
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    Re: Datagrid problem

    Hello,

    I would probably start here to learn about data access in VB. Good luck!

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    7

    Re: Datagrid problem

    Buddy,
    yeh but I will explain my problem in detail

    Private Sub dgIncome_Leave(sender, e)

    ' The code to save changes in datagrid dgIncome as well as new dataset ds1
    'I wrote
    dgIncome.update()
    ds1.Income.AcceptChanges()
    ds1.WriteXml("c:\n.xml")
    dgIncome.Datasource = ds1.Tables("Income")


    End sub

    I don't know why my xml file is not populated with the datagrid
    could you plz explainme in detail

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width