473,409 Members | 2,022 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Locating new row

If I have a data source bound to my DataGridView, and then I perform an
action that adds a new row to that datasource. How can I tell which row in
the DataGridView to focus? I can't just select the last row because the
user may have chosen to sort by one of the numerous columns.
Thanks

Pete
Sep 29 '07 #1
2 1160
Revised question :-)

I found the row I have inserted, but when I do this

PropertyManager pm = (PropertyManager) BindingContext[MyDataGridView];
pm.Position = thatRow.Index;

The index is not updated. How can I set the active row index?

Thanks
Sep 29 '07 #2
Try to set DataGridView.CurrentCell.


"Peter Morris" <su*****@NOdroopySPAMeyes.comwrote in message
news:ut**************@TK2MSFTNGP02.phx.gbl...
Revised question :-)

I found the row I have inserted, but when I do this

PropertyManager pm = (PropertyManager) BindingContext[MyDataGridView];
pm.Position = thatRow.Index;

The index is not updated. How can I set the active row index?

Thanks


Oct 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jonathan Gennick | last post by:
Alex Martelli, Anna Ravenscroft, and I are trying to locate the following people, whose Actionstate Python Cookbook recipes we are wishing to use in the second, printed edition of the Python...
0
by: Anne | last post by:
hie there, i have a couple of questions that i need help on. the first is regarding the closing of a browser.i have an exit button which on click i would like it to totally close the browser, and...
0
by: Johann Blake | last post by:
I'm having trouble grasping how ASP.NET correctly locates resources. There is plenty of documentation on this subject but some things are not clear at all. In my ASP.NET application, I have...
1
by: Radith | last post by:
TO ALL Remember in VB 6.0 we could do slight location adjustments using our arrow keys in the keyboard. How come you can’t do that in VB.NET; do you seriously have to specify pixel values in the...
1
by: Shiraz | last post by:
Hi It seems like none of the old posts get any follow up after a few messages, whether or not something constructive comes out of them, so I'm left with no choice but to repost an earlier...
0
by: kishore.sainath | last post by:
Hi All, The PHP 5.1.1 documentation says that NIS yp_ functions have been moved to the PECL repository and not bundled with PHP 5.1.1. However, I am unable to find it on the PECL site. Any...
2
by: hfk0 | last post by:
Hello, I'm a newbie here and was wondering anyone could help me with this. I have a simple ASP.NET 2 web application running perfectly fine with IIS and SQLServerExpress installed locally on...
1
by: kishore.sainath | last post by:
Hi All, PHP documentation reports that the YP/NIS module is not bundled with PHP after 5.0.4 and is moved to the PECL repository. I am not able to locate it. Thes yp_* functions are an...
0
by: dmlinliverpool | last post by:
I am running VS.net 2005 Express and Sql Server 2005 Express. The DB and VS are both on the same PC. I cannot connect to a database from within VS. In Database Explorer I click Connect To...
4
by: Ty | last post by:
Hi all Short version of my problem: i have a Datagrid (Flexgrid from ComponentOne) with a Datatable as source. I need to search a row in the datatable, using a primary key column in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.