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.
Unfortunately, activation email could not send to your email. Please try again.

How to add values from textboxes into a griddataboundgrid

Thread ID:





90922 Oct 24,2009 07:14 PM Oct 26,2009 05:33 AM ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Elias Avellaneda
Asked On October 24, 2009 07:14 PM

i would like to now how to insert values from textboxes into a row of a 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

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
End Try

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

Jisha Joy [Syncfusion]
Replied On October 26, 2009 05:33 AM

Hi Elias,

You could use the following code to set the values to the cells of GridDataBoundGrid.

this.gridDataBoundGrid1.Model[2, 1].Text = this.textBox1.Text;
this.gridDataBoundGrid1.Model[2, 2].Text = this.textBox2.Text;
this.gridDataBoundGrid1.Model[2, 3].Text = this.textBox3.Text;

Please let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.