Click here to Skip to main content
15,909,437 members
Home / Discussions / C#
   

C#

 
AnswerRe: code 4 random number without repeating number in a row . [modified] Pin
PIEBALDconsult26-Jul-09 12:42
mvePIEBALDconsult26-Jul-09 12:42 
QuestionUnicode Pin
hadad26-Jul-09 4:03
hadad26-Jul-09 4:03 
AnswerRe: Unicode Pin
Manas Bhardwaj26-Jul-09 4:16
professionalManas Bhardwaj26-Jul-09 4:16 
AnswerRe: Unicode Pin
harold aptroot26-Jul-09 4:48
harold aptroot26-Jul-09 4:48 
QuestionC# datagridview display Question Pin
spankyleo12326-Jul-09 3:26
spankyleo12326-Jul-09 3:26 
AnswerRe: C# datagridview display Question Pin
Henry Minute26-Jul-09 3:45
Henry Minute26-Jul-09 3:45 
GeneralRe: C# datagridview display Question Pin
spankyleo12326-Jul-09 4:29
spankyleo12326-Jul-09 4:29 
GeneralRe: C# datagridview display Question Pin
Henry Minute26-Jul-09 4:46
Henry Minute26-Jul-09 4:46 
spankyleo123 wrote:
Is there any easier way


Depends on what you call easy! Big Grin | :-D

It also depends on what you want to do with the data in Form2. If it is read only then you could create a class (I'll refer to it as SelectedData) that has fields for each of the columns of interest from your data, give it a Constructor that takes a DataGridViewRow and load the fields from the dgvRow in the Constructor.

You could then go through your dgv and for each selected row create an instance of SelectedData with the DataGridViewRow and add it to a List<selecteddata>.

Pass the filled List to Form2 and simply set dgvForm2.DataSource to the List<>.

If you need to edit the data in Form2, my previous suggestion, or a variation of it, would be preferable.

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

QuestionTaking screenshots from DirectX Games Pin
SimpleData26-Jul-09 2:55
SimpleData26-Jul-09 2:55 
QuestionInsert Obejct to sorted list Pin
bonzaiholding26-Jul-09 2:44
bonzaiholding26-Jul-09 2:44 
AnswerRe: Insert Obejct to sorted list [modified] Pin
PIEBALDconsult26-Jul-09 4:39
mvePIEBALDconsult26-Jul-09 4:39 
GeneralRe: Insert Obejct to sorted list Pin
bonzaiholding26-Jul-09 6:15
bonzaiholding26-Jul-09 6:15 
GeneralRe: Insert Obejct to sorted list Pin
PIEBALDconsult26-Jul-09 6:26
mvePIEBALDconsult26-Jul-09 6:26 
GeneralRe: Insert Obejct to sorted list [modified] Pin
bonzaiholding26-Jul-09 6:31
bonzaiholding26-Jul-09 6:31 
GeneralRe: Insert Obejct to sorted list Pin
PIEBALDconsult26-Jul-09 6:51
mvePIEBALDconsult26-Jul-09 6:51 
GeneralRe: Insert Obejct to sorted list Pin
bonzaiholding26-Jul-09 20:39
bonzaiholding26-Jul-09 20:39 
GeneralRe: Insert Obejct to sorted list Pin
Luc Pattyn26-Jul-09 11:32
sitebuilderLuc Pattyn26-Jul-09 11:32 
GeneralRe: Insert Obejct to sorted list Pin
PIEBALDconsult26-Jul-09 14:49
mvePIEBALDconsult26-Jul-09 14:49 
AnswerRe: Insert Obejct to sorted list Pin
Martijn Boeker26-Jul-09 21:55
Martijn Boeker26-Jul-09 21:55 
GeneralRe: Insert Obejct to sorted list Pin
bonzaiholding26-Jul-09 22:40
bonzaiholding26-Jul-09 22:40 
GeneralRe: Insert Obejct to sorted list Pin
Martijn Boeker27-Jul-09 9:19
Martijn Boeker27-Jul-09 9:19 
Generalreality check Pin
Luc Pattyn27-Jul-09 10:47
sitebuilderLuc Pattyn27-Jul-09 10:47 
QuestionHow do I add the floating Toolbar with TabPage like "Might and Magic V Map Editor" Pin
akira3225-Jul-09 22:46
akira3225-Jul-09 22:46 
AnswerRe: How do I add the floating Toolbar with TabPage like "Might and Magic V Map Editor" Pin
Abhijit Jana26-Jul-09 3:12
professionalAbhijit Jana26-Jul-09 3:12 
GeneralRe: How do I add the floating Toolbar with TabPage like "Might and Magic V Map Editor" Pin
akira3227-Jul-09 6:45
akira3227-Jul-09 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.