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
865
Row insertion not supported by this data source. (how to add a new row?)
posted

Hi,

I am new to UltraGrid control. I would like to populate th grid on runtime when user select an item from a combo box, data inserts into the grid .... and when user select another item from combo box, data should append to the grid.

i believe i can not use datasource in this scenario.

i have only one band in the grid. I get this error message: "Row insertion not supported by this data source".  I tried to set AddNew property to true but it set itself to False.

This is the code i have written:

Private Sub cmboCategory_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmboCategory.ValueChanged

Me.cmboCatPart.Items.Clear()

Dim lngCatIdx As Long = MobService.GetServiceCatItemID(cmboCategory.SelectedItem.ToString)

For Each drPartsx As DataRow In MobService.ListSubItems(lngCatIdx, False).Rows

Dim invRow As UltraGridRow = Me.gridInvoice1.DisplayLayout.Bands(0).AddNew

invRow.Cells(0).Value = drPartsx.Item(1).ToString

Me.cmboCatPart.Items.Add(drPartsx.Item(1).ToString)

Next

lngCatIdx = Nothing

End Sub

 Thanks for your help.

Kamal

Parents Reply Children
No Data