Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1015
Unable to delete row. Specified method is not supported
posted

I have an UltraGrid bound to a UltraDataSource. I am trying to delete rows from the grid, but when I do so I get the error message box

"Unable to delete row. Specified method is not supported"

The caption on the message box is "Data Error", so I suspect the error might be in the DataSource.

What's the problem? Do I need to delete the row in the DataSource rather than in the grid? Shouldn't it work from the grid.

Here is my code:

          For Each row As UltraGridRow In ugItemsToPick.Rows
                    With row
                        If condition Then
                             row.Delete(False' Don't display confirmation box.
                        End If
                    End With
          Next
  • 71886
    Suggested Answer
    Offline posted

    Hello sch,

    I suggest you use another approach to do this(you could delete the rows from the WinGrid, not necessary to delete them only from the DataSource):

                ultraGrid1.Selected.Rows.AddRange((Infragistics.Win.UltraWinGrid.UltraGridRow[])this.ultraGrid1.Rows.All);            

                ultraGrid1.DeleteSelectedRows(false);

    Please let me know if it suits your needs or you need something else.