Click here to Skip to main content
12,352,083 members (32,186 online)
   

C#

 
GeneralRe: ColorDialog. Pin
Zac Greve10-Dec-12 6:15
memberZac Greve10-Dec-12 6:15 
GeneralRe: ColorDialog. Pin
PHS24110-Dec-12 6:21
memberPHS24110-Dec-12 6:21 
GeneralRe: ColorDialog. Pin
Zac Greve10-Dec-12 9:16
memberZac Greve10-Dec-12 9:16 
QuestionDbConnectionBuilder and class question Pin
Member 82084966-Dec-12 8:21
memberMember 82084966-Dec-12 8:21 
AnswerRe: DbConnectionBuilder and class question Pin
Eddy Vluggen6-Dec-12 14:30
memberEddy Vluggen6-Dec-12 14:30 
QuestionNo scrollbars when executing program on another PC [Solved] Pin
Member 96474616-Dec-12 7:43
memberMember 96474616-Dec-12 7:43 
AnswerRe: No scrollbars when executing program on another PC Pin
Alan N6-Dec-12 13:32
memberAlan N6-Dec-12 13:32 
QuestionCompare rows of a datagridview and remove repeated rows Pin
GREG_DORIANcod6-Dec-12 6:12
memberGREG_DORIANcod6-Dec-12 6:12 
Hi there!

I am trying to compare the rows of a Datagridview and that it removes the rows that are repeated.
I think that I´m doing something wrong, need some of help!!
my mind is not clear today! (maybe x-mas holyday! Wink | ;) )
here´s the code:
public void Compare(DataGridView grv)
{
 grv.Sort(grv.Columns[0],ListSortDirection.Ascending);
 for ( int row = 0; row < grv.Rows.Count; row++)
 {
 for ( int col = 0; col < grv.Columns.Count; col++)
 {
     int rowx=1;
     if (grv.Rows[row].Cells[col].Value != null && grv.Rows[row].Cells[col].Value.Equals(grv.Rows[rowx].Cells[col].Value))
     {
         if (col == grv.Columns.Count - 1)
         {
             grv.Rows.RemoveAt(row);
             grv.Sort(grv.Columns[0], ListSortDirection.Descending);
         }
     }
     else
     {
         grv.FirstDisplayedScrollingRowIndex = grv.RowCount - 1;
         grv.Rows[grv.RowCount - 1].Selected = true;
     }
    }
 }
}

AnswerRe: Compare rows of a datagridview and remove repeated rows Pin
Member 96474616-Dec-12 8:30
memberMember 96474616-Dec-12 8:30 
Question[OptionalField] prevents deserialization [SOLVED] Pin
Alan Balkany6-Dec-12 5:20
memberAlan Balkany6-Dec-12 5:20 
QuestionShare datalayer in memory Pin
RICARDOR2708746-Dec-12 5:14
memberRICARDOR2708746-Dec-12 5:14 
AnswerRe: Share datalayer in memory Pin
Eddy Vluggen6-Dec-12 5:32
memberEddy Vluggen6-Dec-12 5:32 
QuestionLocalize ColorDialog Pin
David Knechtges6-Dec-12 4:28
memberDavid Knechtges6-Dec-12 4:28 
AnswerRe: Localize ColorDialog Pin
Zac Greve7-Dec-12 17:23
memberZac Greve7-Dec-12 17:23 
QuestionHow to get enum as parameter thru interface Pin
MichCl6-Dec-12 4:00
memberMichCl6-Dec-12 4:00 
AnswerRe: How to get enum as parameter thru interface Pin
DaveyM696-Dec-12 4:08
mentorDaveyM696-Dec-12 4:08 
AnswerRe: How to get enum as parameter thru interface Pin
PIEBALDconsult6-Dec-12 4:55
memberPIEBALDconsult6-Dec-12 4:55 
QuestionWhat would be the best approach for screen sharing c# Pin
Tridip Bhattacharjee5-Dec-12 21:00
memberTridip Bhattacharjee5-Dec-12 21:00 
AnswerRe: What would be the best approach for screen sharing c# Pin
Eddy Vluggen6-Dec-12 5:28
memberEddy Vluggen6-Dec-12 5:28 
GeneralRe: What would be the best approach for screen sharing c# Pin
Tridip Bhattacharjee6-Dec-12 19:54
memberTridip Bhattacharjee6-Dec-12 19:54 
GeneralRe: What would be the best approach for screen sharing c# Pin
Eddy Vluggen7-Dec-12 1:20
memberEddy Vluggen7-Dec-12 1:20 
QuestionExtending OpenFileDialog to select folder and file simultaneously Pin
hemant.4oct5-Dec-12 19:57
memberhemant.4oct5-Dec-12 19:57 
AnswerRe: Extending OpenFileDialog to select folder and file simultaneously Pin
Richard MacCutchan5-Dec-12 21:41
mvpRichard MacCutchan5-Dec-12 21:41 
GeneralRe: Extending OpenFileDialog to select folder and file simultaneously Pin
hemant.4oct5-Dec-12 22:16
memberhemant.4oct5-Dec-12 22:16 
GeneralRe: Extending OpenFileDialog to select folder and file simultaneously Pin
Eddy Vluggen6-Dec-12 2:28
memberEddy Vluggen6-Dec-12 2:28 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 27 Jun 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid