Click here to Skip to main content
15,890,825 members
Home / Discussions / C#
   

C#

 
AnswerRe: Datetimepicker: manual input Pin
V.16-Sep-10 20:09
professionalV.16-Sep-10 20:09 
GeneralRe: Datetimepicker: manual input Pin
mSh198516-Sep-10 20:18
mSh198516-Sep-10 20:18 
Questionhow to convert a column in gridview to combobox after binding?? Pin
leeoze16-Sep-10 3:26
leeoze16-Sep-10 3:26 
Answerfound the answer :) Pin
leeoze16-Sep-10 3:43
leeoze16-Sep-10 3:43 
QuestionDatagridview returns wrong rownumber Pin
RobScripta16-Sep-10 3:09
professionalRobScripta16-Sep-10 3:09 
AnswerRe: Datagridview returns wrong rownumber Pin
PIEBALDconsult16-Sep-10 3:15
mvePIEBALDconsult16-Sep-10 3:15 
GeneralRe: Datagridview returns wrong rownumber Pin
RobScripta16-Sep-10 3:23
professionalRobScripta16-Sep-10 3:23 
AnswerRe: Datagridview returns wrong rownumber Pin
RobScripta16-Sep-10 4:10
professionalRobScripta16-Sep-10 4:10 
As a result of the answer of Piebaldconsult I experimented a bit further

I have 35 rows, of which 24 are visible.
I open the form and click the last row e.rowindex is 34 (as expected) and another form is opened.
I close the other form, and click the last row again and e.rowindex is 23

This behaviour I can't explain.

If I sort the form the first click again gives the correct e.rowindex of 34, the subsequent e.rowindex is again 23.

It could be the activated event of this form in which the sort action is performed again:

try
{
    DataGridViewColumn dgvColumn = this.DgvAfsprakenAgenda.Columns[Program.AgendaSortColumn];
    if (Program.AgendaSortOrder == "A")
    {
        this.DgvAfsprakenAgenda.Sort(dgvColumn, ListSortDirection.Ascending);
    }
    else
    {
        this.DgvAfsprakenAgenda.Sort(dgvColumn, ListSortDirection.Descending);
    }
    this.tbSorteer.Text = Program.AgendaSortColumn.ToString();
}
catch

{
}

Obviously I'm doing something wrong here...
AnswerProblem solved Pin
RobScripta16-Sep-10 4:29
professionalRobScripta16-Sep-10 4:29 
QuestionC# Pin
arindam201016-Sep-10 1:23
arindam201016-Sep-10 1:23 
AnswerRe: C# Pin
OriginalGriff16-Sep-10 1:54
mveOriginalGriff16-Sep-10 1:54 
GeneralMessage Removed Pin
16-Sep-10 2:08
arindam201016-Sep-10 2:08 
GeneralRe: C# Pin
Not Active16-Sep-10 2:17
mentorNot Active16-Sep-10 2:17 
AnswerInterview question Pin
Not Active16-Sep-10 2:16
mentorNot Active16-Sep-10 2:16 
GeneralRe: Interview question Pin
Luc Pattyn16-Sep-10 2:25
sitebuilderLuc Pattyn16-Sep-10 2:25 
GeneralRe: Interview question Pin
Not Active16-Sep-10 2:59
mentorNot Active16-Sep-10 2:59 
AnswerRe: C# [modified] Pin
OriginalGriff16-Sep-10 5:19
mveOriginalGriff16-Sep-10 5:19 
GeneralRe: C# Pin
Chris Trelawny-Ross16-Sep-10 8:42
Chris Trelawny-Ross16-Sep-10 8:42 
GeneralRe: C# Pin
OriginalGriff16-Sep-10 8:50
mveOriginalGriff16-Sep-10 8:50 
GeneralRe: C# Pin
Pete O'Hanlon16-Sep-10 10:08
mvePete O'Hanlon16-Sep-10 10:08 
GeneralRe: C# Pin
OriginalGriff16-Sep-10 21:23
mveOriginalGriff16-Sep-10 21:23 
AnswerRe: C# Pin
#realJSOP16-Sep-10 23:36
mve#realJSOP16-Sep-10 23:36 
QuestionCreate XML using XSD Pin
NarVish15-Sep-10 23:36
NarVish15-Sep-10 23:36 
AnswerRe: Create XML using XSD Pin
Pete O'Hanlon16-Sep-10 1:31
mvePete O'Hanlon16-Sep-10 1:31 
GeneralRe: Create XML using XSD Pin
NarVish16-Sep-10 1:41
NarVish16-Sep-10 1:41 

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.