473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Textbox bind text does not change when I click on GridControl

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
  4.  
  5. Dim findTable As String = lbl_selectedActivity.Text.Replace(" ", "_")
  6. findTable = "zTable_" & findTable
  7. Dim table_name = findTable
  8.  
  9. Dim user As String = "Harika_VM" 'Environment.UserName
  10.  
  11. GridControl_UserWork.DataSource = Nothing
  12. GridView_UserWork.Columns.Clear()
  13.  
  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)
  18.  
  19. GridView_UserWork.BestFitColumns()
  20.  
  21. ' I DONT KNOW WHERE TO WRITE THIS TEXT, SO THAT WHEN I CLICK ON GRIDCONTROL IT SHOULD CHANGE AS PER THE RECORD
  22.  
  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,
Sirajuddin
Jul 27 '13 #1
0 969

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

Similar topics

9
by: msnews.microsoft.com | last post by:
Hello! I'm Jim by asp How can show "abc" in textbox when click one botton?
6
by: Alpha | last post by:
I have several textboxes that I need to chang the text when the selection row is changed in a datagrid. I have the following code. This textbox displayes the initial selection but when I click on...
11
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
5
by: marfi95 | last post by:
I'm very confused. I'm trying to automatically select the text when my textbox gets the focus. This is typically when the user has clicked the mouse in the field. This is the code I have in...
2
by: Matt B | last post by:
This seems like it has probably been covered many times before, but I'm having a hard time finding any discussion about it (probably just searching the wrong terms). Is there a way to capture...
16
by: mj.redfox.mj | last post by:
Can anyone help? I have a textbox which I'm programatically adding by using the following code: txtTest = New TextBox txtTest.ID = "txtLeft" + cntCount.ToString...
4
by: Dean Slindee | last post by:
Anyone got a quick and easy way to change the background color on a textbox after the user has change the text value. Already have lots of forms written, so an approach that does not depend on...
2
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, In asp.net 1.1 I use this bit of code to get the text from a textbox in a datagrid on postback: txtComments = CType(dgi.FindControl("txtComments"), System.Web.UI.WebControls.TextBox) We...
2
by: pedro | last post by:
TEXTBOX --- i want to select part of the text and change its style how can i do this? manny forums have this feature msdn forum you select the text and press button for formating code.
4
by: fts2012 | last post by:
' if the textbox is empty show an error message 1001 Private Sub TextBox1_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.