locked
Question about DATAGRIDVIEW RRS feed

  • Question

  • hi all , i have textbox and datagridview (contains 3 columns) , .... i wanna  show the content of the datagrid cell i clicked it on the textbox , but only the cells under the middle column, but the other 2 columns dont make any effect to the textbox.

    thanks>>>>


    My Mail For Chat : Eng.Shady_Mohamed@yahoo.com --- Programming is a Philosophy, You Can Make a Lot of Codes For Same Result. IF my answer made a benefits to you , THEN Green my thread.

    Friday, February 22, 2013 5:39 PM

Answers

  • Hello,

    If the DataGridView has a DataTable (or a DataTable in a DataSet) as the DataSource property of the DataGridView you can using data binding. For instance if the column you want to display in a TextBox we would use the following TextBox1.DataBindings.Add("Text",YourDataTable,"FieldToBind").


    kevininstructor

    • Proposed as answer by Mike Feng Tuesday, February 26, 2013 10:01 AM
    • Marked as answer by Mike Feng Thursday, February 28, 2013 1:58 PM
    Friday, February 22, 2013 5:55 PM