Hi all,
Need your help.
I have a GridControl (GridView) and a TextBox. I also have few links on the form. When I click on the link its value is captured on a lable (lbl_selectedAc tivity). I'm appending "zTable_" to that text so that I can get the table name.
So as soon as I click on Link, im filling gridcontrol with table (records). Im trying to bind MemoEdit with one of the column in the table. Column name is "Comments". But it is only binding the first record which is displayed in gridcontrol. But when I click on some other record it is not changing the MemoEdit text as I wrote the all the code together.
I'm not able to figure out where to write binding text. Could you please help me with it. I tried browsing so many articles and question on your website, but I couldn't find anything related with my issue.
Please note, Im doing everything by coding but not in design view as it wont match my requirement. Below is the code
---------------------------------------------------------
---------------------------------------------------------
Really need your help. Could someone please help me.
Thanks & Regards,
Sirajuddin
Need your help.
I have a GridControl (GridView) and a TextBox. I also have few links on the form. When I click on the link its value is captured on a lable (lbl_selectedAc tivity). I'm appending "zTable_" to that text so that I can get the table name.
So as soon as I click on Link, im filling gridcontrol with table (records). Im trying to bind MemoEdit with one of the column in the table. Column name is "Comments". But it is only binding the first record which is displayed in gridcontrol. But when I click on some other record it is not changing the MemoEdit text as I wrote the all the code together.
I'm not able to figure out where to write binding text. Could you please help me with it. I tried browsing so many articles and question on your website, but I couldn't find anything related with my issue.
Please note, Im doing everything by coding but not in design view as it wont match my requirement. Below is the code
---------------------------------------------------------
Code:
Dim database_path As String = "dbase.accdb" 'Database path
Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & database_path & "; Jet OLEDB:Database Password=#955#59%8;")
Dim ds As New DataSet
Dim findTable As String = lbl_selectedActivity.Text.Replace(" ", "_")
findTable = "zTable_" & findTable
Dim table_name = findTable
Dim user As String = "Harika_VM" 'Environment.UserName
GridControl_UserWork.DataSource = Nothing
GridView_UserWork.Columns.Clear()
ds.Clear()
Dim adpt_UserWork As New OleDbDataAdapter("Select * from " & table_name & " where Processor = '" & user & "' order by ID_NO desc", con)
adpt_UserWork.Fill(ds, table_name)
GridControl_UserWork.DataSource = ds.Tables(table_name)
GridView_UserWork.BestFitColumns()
' I DONT KNOW WHERE TO WRITE THIS TEXT, SO THAT WHEN I CLICK ON GRIDCONTROL IT SHOULD CHANGE AS PER THE RECORD
MemoEdit_UserWork.DataBindings.Clear()
MemoEdit_UserWork.DataBindings.Add("EditValue", ds, "" & table_name & ".comments")
---------------------------------------------------------
Really need your help. Could someone please help me.
Thanks & Regards,
Sirajuddin