|
-
May 5th, 2007, 07:35 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] DataGridView + selection Q
Greetings,
how can I achive that a databound dgv after her initial filling NOT the first row selected is?
thx in advance
-
May 5th, 2007, 07:41 AM
#2
Re: [2005] DataGridView + selection Q
-
May 5th, 2007, 07:51 AM
#3
Thread Starter
Hyperactive Member
Re: [2005] DataGridView + selection Q
@shakti5385
I have a databound dgv. When the application starts the dgv gets all the records from the db. After this the dgv has automaticly the focus on the first row.
What I need is that whatever row is not selected until the user has clicked on a row.
-
May 5th, 2007, 08:18 AM
#4
Re: [2005] DataGridView + selection Q
Set allow user to addRow as False
-
May 5th, 2007, 08:29 AM
#5
Thread Starter
Hyperactive Member
Re: [2005] DataGridView + selection Q
@shakti5385
all properties starting with "AllowUser....." are set = false.
Still the first record in the dgv is highligted
Last edited by Bongo; May 5th, 2007 at 08:34 AM.
-
May 5th, 2007, 08:51 AM
#6
Re: [2005] DataGridView + selection Q
As long as the grid is not the first control in the Tab order then you can set its CurrentCell property to Nothing AFTER it is populated. If it is the first control in the Tab order then you can still use the same code but it must be done AFTER the form has been displayed, i.e. in the Shown event handler.
-
May 5th, 2007, 09:15 AM
#7
Thread Starter
Hyperactive Member
Re: [RESOLVED] [2005] DataGridView + selection Q
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|