By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Textbox bind text does not change when I click on GridControl

P: 1
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_selectedActivity). 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


Expand|Select|Wrap|Line Numbers
  1. Dim database_path As String = "dbase.accdb" 'Database path
  2. Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & database_path & "; Jet OLEDB:Database Password=#955#59%8;")
  3. Dim ds As New DataSet
  5. Dim findTable As String = lbl_selectedActivity.Text.Replace(" ", "_")
  6. findTable = "zTable_" & findTable
  7. Dim table_name = findTable
  9. Dim user As String = "Harika_VM" 'Environment.UserName
  11. GridControl_UserWork.DataSource = Nothing
  12. GridView_UserWork.Columns.Clear()
  14. ds.Clear()
  15. Dim adpt_UserWork As New OleDbDataAdapter("Select * from " & table_name & " where Processor = '" & user & "' order by ID_NO desc", con)
  16. adpt_UserWork.Fill(ds, table_name)
  17. GridControl_UserWork.DataSource = ds.Tables(table_name)
  19. GridView_UserWork.BestFitColumns()
  23. MemoEdit_UserWork.DataBindings.Clear()
  24. MemoEdit_UserWork.DataBindings.Add("EditValue", ds, "" & table_name & ".comments")


Really need your help. Could someone please help me.

Thanks & Regards,
Jul 27 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.