Click here to Skip to main content
15,791,740 members
Home / Discussions / C#
   

C#

 
Questionshowing newly added row in datagridview - Winforms Pin
manumith25-Apr-11 11:09
manumith25-Apr-11 11:09 
AnswerRe: showing newly added row in datagridview - Winforms Pin
Not Active25-Apr-11 11:40
mentorNot Active25-Apr-11 11:40 
GeneralRe: showing newly added row in datagridview - Winforms Pin
manumith25-Apr-11 11:43
manumith25-Apr-11 11:43 
GeneralRe: showing newly added row in datagridview - Winforms Pin
Not Active25-Apr-11 12:49
mentorNot Active25-Apr-11 12:49 
GeneralRe: showing newly added row in datagridview - Winforms Pin
manumith25-Apr-11 14:04
manumith25-Apr-11 14:04 
GeneralRe: showing newly added row in datagridview - Winforms Pin
Richard MacCutchan25-Apr-11 23:08
mveRichard MacCutchan25-Apr-11 23:08 
GeneralRe: showing newly added row in datagridview - Winforms Pin
Pete O'Hanlon25-Apr-11 23:38
subeditorPete O'Hanlon25-Apr-11 23:38 
AnswerRe: showing newly added row in datagridview - Winforms Pin
Luc Pattyn25-Apr-11 12:11
sitebuilderLuc Pattyn25-Apr-11 12:11 
I don't know, however:

1.
I would not call curr.sequence() over and over, if it were to change its mind in between calls, you'd be in trouble; so just call it once, store the value in a local variable, and use it.

2.
as the new row is at the bottom, how about
int nRows=dataGridView1.Rows.Count;
if (nRows>0) dataGridView1.CurrentCell = dataGridView1.Rows[nRows-1].Cells[0];


Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

Question.NET Collections - Capacity [modified] Pin
devvvy25-Apr-11 2:03
devvvy25-Apr-11 2:03 
AnswerRe: .NET Collections - Capacity Pin
Luc Pattyn25-Apr-11 2:17
sitebuilderLuc Pattyn25-Apr-11 2:17 
GeneralRe: .NET Collections - Capacity Pin
devvvy25-Apr-11 2:27
devvvy25-Apr-11 2:27 
GeneralRe: .NET Collections - Capacity Pin
Luc Pattyn25-Apr-11 2:33
sitebuilderLuc Pattyn25-Apr-11 2:33 
GeneralRe: .NET Collections - Capacity Pin
devvvy25-Apr-11 2:37
devvvy25-Apr-11 2:37 
GeneralRe: .NET Collections - Capacity [modified] Pin
devvvy25-Apr-11 2:52
devvvy25-Apr-11 2:52 
GeneralRe: .NET Collections - Capacity Pin
AspDotNetDev25-Apr-11 12:05
protectorAspDotNetDev25-Apr-11 12:05 
GeneralRe: .NET Collections - Capacity Pin
Jason Christian26-Apr-11 9:13
Jason Christian26-Apr-11 9:13 
AnswerRe: .NET Collections - Capacity Pin
AspDotNetDev25-Apr-11 12:10
protectorAspDotNetDev25-Apr-11 12:10 
GeneralRe: .NET Collections - Capacity Pin
Charvak Karpe28-Apr-11 4:47
Charvak Karpe28-Apr-11 4:47 
QuestionHow Can i Create A Class Library For MSACCESS database Connection Pin
Arunkumar.Koloth24-Apr-11 20:03
Arunkumar.Koloth24-Apr-11 20:03 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
Tarakeshwar Reddy24-Apr-11 20:13
professionalTarakeshwar Reddy24-Apr-11 20:13 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
Richard MacCutchan24-Apr-11 23:02
mveRichard MacCutchan24-Apr-11 23:02 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
PIEBALDconsult25-Apr-11 4:01
professionalPIEBALDconsult25-Apr-11 4:01 
AnswerRe: How Can i Create A Class Library For MSACCESS database Connection Pin
ambarishtv28-Apr-11 7:27
ambarishtv28-Apr-11 7:27 
QuestionListBox.PreferredSize.Width interesting event Pin
msn9224-Apr-11 5:33
msn9224-Apr-11 5:33 
AnswerRe: ListBox.PreferredSize.Width interesting event Pin
DaveyM6924-Apr-11 13:30
professionalDaveyM6924-Apr-11 13:30 

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.