Forum guidelines
datagridview C# windows forms
Posted By sairam on 02 Mar 2009

I have a datagrid view dg1 with 3 columns in it from form F1.

when i select a row in datagrid and click on button called modify, another form F2 pops up with 3 text boxes and all these 3 text boxes are filled by the values in the columns  of the selected row of datagrid.





Re: datagridview C# windows forms
Posted By Bechir Bejaoui on 02 Mar 2009  

Create a class outside the both form1 and form2

define an a static array within this class in which  cells' values will be stored

Then you stock all those cells values within this array, afterward you assign each of this array elements to its corresponding text box in the F2

Every one among us was a beginner once.
Download Free E-books


Spire.Doc - Free .NET Word API
Use Spire.Doc to create, read, write, print, and convert word documents to OpenXML, RTF, TXT, XPS, EPUB, EMF, HTML, Image and PDF.