We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to add values from textboxes into a unbound griddataboundgrid

Hi!
i would like to now how to insert values from textboxes into a row of a unbound GDBG.

I tried with this but the values are not inserted:

Private Sub btnAddProduct_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddProduct.Click

Try
Me.GridDataBoundGridPedido.Item(1, 1).CellValue = 12

'Me.GridDataBoundGridPedido.Item(1, 1).CellValue = Me.txtCodProd.Text
'GridDataBoundGridPedido.Item(1, 2).CellValue = Me.txtDescProd.Text
'GridDataBoundGridPedido.Item(1, 3).CellValue = Me.lblPrecProd.Text
'GridDataBoundGridPedido.Item(1, 4).CellValue = Me.txtCantProd.Text
'GridDataBoundGridPedido.Item(1, 5).CellValue = 1224
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try


End Sub
If someone could give me the solution, i would appreciate a lot!
Thank!

1 Reply

LS Lingaraj S Syncfusion Team October 26, 2009 12:35 PM UTC

Hi Elias,

Thank you for your interest in Syncfusion products.

A bounded column has it own datastore to store the values entered in it. But in an unbound column there is no datastore present in it, so it has to be handled manually by adding any collection like hashtable. To make unbound column work together with sort, assign key as corresponding primary key value in the row in the Key/Value pair of the external collection.

Refer the sampel from below link, it shows the behavior of unbound column in GridDataBoundGrid.
http://websamples.syncfusion.com/samples/KB/Grid.Windows/UnboundCheckboxColumn/main.htm

Please let me know if you have any queries.

Regards,
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon