Im trying to display data in a datagrid then once a row is selected show a different column of the database in a text box. Data Grid View Cell Event Args) Handles Data Grid View1. I use the unique primary key in the datagridview as not visible so once the row is selected, i can get that integer and populate the textbox by using another database query. Tables("abcd") End Sub Private Sub Data Grid View1_Cell Click(By Val sender As Object, By Val e As System. Cell Click Dim i, j As Integer i = Data Grid View1. Value End Sub Im trying to display data in a datagrid then once a row is selected show a different column of the database in a text box. Value 'do the rest End If End Sub Private Sub datagridview1_Key Up(By Val sender As System.
Find Control("txtaddress"), Text Box) Dim city As Text Box = Direct Cast(grid View.
Find Control("txtcity"), Text Box) Dim state As Text Box = Direct Cast(grid View.
Find Control("txtstate"), Text Box) Dim zip As Text Box = Direct Cast(grid View.
It is working now I want connect a datagrid form nearly it is also completed but I want to view a checkbox in datagrid for “yes or no” what is the code for place the checkbox in datagrid and calendar popup, Using file Thanking you Yours sincerely If any spelling mistakes "sorry........" hi i had added vales in data grid i need to add the vales and display how to do it i need to select values in previous row and values in current row add then display in current row how to do it plz mail me in [email protected]'IMPORTS NAMESPACE FOR THE CONNECTION Imports System.
Now I am doing a project using connecting sting “Provider=Microsoft. OLEDB.4.0; Data Source=C:\Project.mdb; Persist Security Info=False” now I am completed data entry form. Sql Client Dim sadapt1 As Sql Data Adapter Dim cn As Sql Connection Dim ds As Data Table 'BIND THE RECORDS ON THE PAGE LOAD Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load 'SET THE CONNECTION AND BIND TO THE GRIDVIEW cn = New Sql Connection("server=shailu;uid=sa;pwd=;database=delete;") sadapt1 = New Sql Data Adapter("select * from emp", cn) ds = New Data Table sadapt1.