IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: Getting the data
Note: You mention ASP.NET - I'm doing local C# app. The docs intermix the 2 all the time though. Bleck.

I've studied the WinForms and application stuff a bit, but all the real work I've done is with ASP.NET. So that is the only part I can remember, and I'm on vacation right now so I can't be bothered to look it up. Microsoft has gotten the underlying objects very nearly the same though, even when it forces them to be stupid.

Something like this should work.

int row = FormCodeGrid.CurrentRowIndex;
string TheText = FormCodeGrid.Rows[row].Cells[TheColumnWeCareAbout].Text;

Depending on the type of Grid you may be able to do this also.

string TheText = FormCodeGrid.SelectedRow.Cells[TheColumnWeCareAbout].Text;

Jay
New Neither works
'System.Windows.Forms.DataGrid' does not contain a definition for 'Rows'

Grrr.

I'll look further.

Thanks
     More C# / Windows Forms questions - (crazy) - (10)
         Re: More C# / Windows Forms questions - (JayMehaffey) - (7)
             Getting the data - (crazy) - (6)
                 Re: Getting the data - (JayMehaffey) - (1)
                     Neither works - (crazy)
                 Getting closer - (crazy) - (3)
                     Got it - (crazy)
                     Re: Getting closer - (JayMehaffey) - (1)
                         Yup - see other post -NT - (crazy)
         A couple of ways to do it... - (ChrisR) - (1)
             Got it - (crazy)

Powered by Price-Pfister.
129 ms