Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WinForm
i have a datagrid with values from database in Form1. If a pass a value from form2 then the values should add at the end of the datagrid rows. kindly help with sample code.....
Posted 25-Aug-12 1:13am
Comments
Wes Aday at 25-Aug-12 7:15am
   
"kindly help with sample code"... no that is not how things work here. Try something for yourself then come back and ask a specific question if you get stuck.
kumar.svk at 25-Aug-12 7:24am
   
I have tried following code

dgvIssueDtl.AllowUserToAddRows = true;
dgvIssueDtl.Rows.Add();

but the rows are adding in the middle of my datagrid. i want it at end of the row....
@amitgajjar at 25-Aug-12 7:29am
   
Post your complete code in your question. use Improve question to update content of your question.
ridoy at 25-Aug-12 7:43am
   
all newcomers expect code form codeproject now-a-days!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Have a look at: A Detailed Data Binding Tutorial[^]
 
I think you need to refactor your code - separating data and ui.
 
Have a look at what I do here:Depends4Net - Part 2[^] - this makes working with your data quite easy.
 
Best regards
Espen Harlinn
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Dnyaneshwar@Pune 604
1 thatraja 370
2 OriginalGriff 319
3 Sergey Alexandrovich Kryukov 241
4 Gihan Liyanage 194
0 OriginalGriff 737
1 Dnyaneshwar@Pune 604
2 Kornfeld Eliyahu Peter 505
3 Sergey Alexandrovich Kryukov 372
4 thatraja 370


Advertise | Privacy | Mobile
Web01 | 2.8.140902.1 | Last Updated 25 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100