Community discussion forum

Getting text from the Datagrid into textbox

  • 8 months ago
    I am using one datagrid and text box in a Form by vb.net coding I have to know that the basically i have load the data into datagrid and the columns are Contact_ID and ContactName once I select the ContactName from the datagrid how it will display on my textbox by selecting only datagrid's data i.e. (ContactName Data) and which event and which property i will use for that datagrid further when it will display on my textbox I want to Edit that ContactName by Update quary so please help me for that in a VB.NET Coding any one can help me in coding for that problem. Thanks in advance
    Post was edited on 06/03/2009 12:53:07 Report abuse
  • 8 months ago
    You can use Currentcellchanged event to execute your code, and use the following to access datadrid data into textbox. TextBox1.Text = DataGrid1.Item(DataGrid1.CurrentRowIndex, 1)

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!