Home Forums WinForms controls Xceed Grid for WinForms Save Xceed Grid! Please help me.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15644 |

    Hi!
    I write app, but i’m not save Grid into table.

    My app: grid: grdHMT

    Load Grid
    dataSetHMT.Clear()
    sql = “SELECT * FROM [03a-HmTONG] WHERE MAHD_ID=” & iID & ” AND MaPhan=” & iPhan

    Me.AdapterHMT = New SqlDataAdapter(sql, cnn)
    Me.AdapterHMT.Fill(dataSetHMT, “[03a-HmTONG]”)
    GrdHMT.BeginInit()
    GrdHMT.SetDataBinding(dataSetHMT, “[03a-HmTONG]”)
    GrdHMT.EndInit()

    Save Grid
    GrdHMT.Update()
    If Me.dataSetHMT.has Then
    Dim newDS As New DataSet
    newDS = Me.dataSetHMT.GetChanges
    Dim myBuilder As New SqlCommandBuilder(Me.AdapterHMT)
    Me.AdapterHMT.TableMappings.Add(“Table”, Me.dataSetHMT.Tables(0).TableName)
    Try
    Me.AdapterHMT.Update(newDS)
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
    Me.LoadGrid(iHD)
    End If

    But SaveGrid — error

    please help me, and send me example about SAVEGrid.
    Email: phuong_huynhduy@yahoo.com
    Thanks.

    Imported from legacy forums. Posted by phuonghuynhduy (had 1847 views)

    Xceed Support
    Member
    Post count: 5658

    We do not support how you should manage your data (like saving the Grid).

    However, since the grid his binded on your dataSetHMT, “Update()” statement should look like this:

    e.g.,
    GrdHMT.Update(dataSetHMT)

    Imported from legacy forums. Posted by CharlesB (had 2812 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.