| | |
Bindingnavigator,Datagridview,textboxes
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 1
Reputation:
Solved Threads: 0
Hy
,
I need help please !
I am developping an application with vb.net and sql server .I have a form containing a datagridview ,textboxes ,bindingsource and bindingnavigator .
I want that the columns of the selectedrow of datagridview appear and change in textboxes when the selectedrow is changed by the bindingnavigator buttons .
This is what i wrote in the my code :
Private Sub gridproduits_RowStateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewRowStateChangedEventArgs) Handles gridproduits.RowStateChanged
TextBox1.Text = gridproduits.SelectedRows(0).Cells(0).Value
TextBox2.Text = gridproduits.SelectedRows(0).Cells(1).Value
TextBox3.Text = gridproduits.SelectedRows(0).Cells(2).Value
End Sub
But it doesn't work !
.It appears an error message :
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
,I need help please !
I am developping an application with vb.net and sql server .I have a form containing a datagridview ,textboxes ,bindingsource and bindingnavigator .
I want that the columns of the selectedrow of datagridview appear and change in textboxes when the selectedrow is changed by the bindingnavigator buttons .
This is what i wrote in the my code :
Private Sub gridproduits_RowStateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewRowStateChangedEventArgs) Handles gridproduits.RowStateChanged
TextBox1.Text = gridproduits.SelectedRows(0).Cells(0).Value
TextBox2.Text = gridproduits.SelectedRows(0).Cells(1).Value
TextBox3.Text = gridproduits.SelectedRows(0).Cells(2).Value
End Sub
But it doesn't work !
.It appears an error message :Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: Input from textbox!!
- Next Thread: help regarding timer
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms ftp generatetags html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey table temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





