Bug Report B190858
Visible to All Users

How to refresh GridView's data after update or delete operation in case of , GridControl.datasource = Datatable

created 15 years ago

Hi I have created a datatable and to view its data, I use "GridControl.datasource = Datatable" but when I do any update or delete operation on datatable, I dont see any data is actually refreshing in gridview. I have tried couple of methods but nothing worked for me.
Try outs:

  1. GridControl1.RefreshDataSource()

  2. GridControl1.Refresh()

  3. GridView1.RefreshData()

  4. GridView1.RefreshEditor(True)

Dim d As New RefreshDataTableValues(AddressOf UpdateValues)
     GridControl1.Invoke(d)

Public Delegate Sub RefreshDataTableValues()
      Public Sub UpdateValues()
           GridControl1.RefreshDataSource()
      End Sub
How to bind datatable to Grid so that any update on data will change it in gridview real time?

Comments (3)
DevExpress Support Team 15 years ago

    Hi,
    It's very strange, that none of these methods helps you.
    Could you please provide us with a sample illustrating your issue?
    We will examine it, and do our best to help you.
    Thanks,
    Andrew

    FA FA
    Forward Advantage 14 years ago

      No longer an issue.

        C#
        // after delete or update on gridView1 ,, Datatable1.AcceptChanges();

        Note: "Datatable1" is the datasource of gridView1

        C#

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.