473,394 Members | 1,845 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,394 software developers and data experts.

DataView, BindingContext

Using the BindingContext we will be able to find the
actual position of the row selected in a DataView
(regardless of the sort used).

What I want to do is exactly the reverse. That is, I know
the actual position of the row in the BindingContext, and
from that I want to know the position of the same in a
dataview/datagrid. Is this possible?

The reason why I want to do this is becuase of the
following scenario:
I have a dataview, with AllowNew false. I have a datagrid
bound to this dataview. I insert new rows
programmatically. Once a new row is inserted I want the
datagrid to select that new row, regardless of the sort
used. But I know only the actual position of the row in
the BindingContext, and not the position in the datagrid,
(which is required for selecting).

Thanks in advance,
Rakesh

Nov 15 '05 #1
1 2006
Hi Rakesh,

IMO they should be the same.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Rakesh" <an*******@discussions.microsoft.com> wrote in message
news:0f****************************@phx.gbl...
Using the BindingContext we will be able to find the
actual position of the row selected in a DataView
(regardless of the sort used).

What I want to do is exactly the reverse. That is, I know
the actual position of the row in the BindingContext, and
from that I want to know the position of the same in a
dataview/datagrid. Is this possible?

The reason why I want to do this is becuase of the
following scenario:
I have a dataview, with AllowNew false. I have a datagrid
bound to this dataview. I insert new rows
programmatically. Once a new row is inserted I want the
datagrid to select that new row, regardless of the sort
used. But I know only the actual position of the row in
the BindingContext, and not the position in the datagrid,
(which is required for selecting).

Thanks in advance,
Rakesh

Nov 15 '05 #2

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

Similar topics

0
by: RPI_alum | last post by:
I've been experiencing some frustrating behavior that I believe may be a MS bug in the Framework. Has anyone else experienced this, know a better way to resolve it, or if it is an actual MS bug ...
1
by: amber | last post by:
I have a datagrid, based on a dataview (filled with dataset data from SQL server). The dataview contains an ID field, but this field isn't in the datagrid. How can I get the ID associated with...
4
by: Hein Albrecht | last post by:
'ello How can I get the DataRow of the DataGrid's SelectedItem for the bound DataView's DataTable? Thanx Hein
13
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying...
4
by: Jazper Manto | last post by:
hi i bounded the same dataview to 2 different comboboxes. now, when i change the selectedIndex of combobox1, it automatically changes the selectedIndex of combobox2. does this mean, that the...
6
by: Dazz | last post by:
Hi I desperately need some help. I want to have a DataView sorted alphabetically by a specific column, then I want to find the first record that begins with the letter the user inputs and get...
0
by: nina98765 | last post by:
Hi all I have a data-bound Windows form bound to a strongly-typed dataset. Upon opening the form, I would like to Find a specific record based on a parameter I've passed to the form, and display...
4
by: Aaron Smith | last post by:
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID ASC", DataViewRowState.CurrentRows) Dim iPos As Integer = dv.Find(dr.Item("ID")) Me.BindingContext(FacilitiesDS1,...
3
by: astro | last post by:
I have a datagrid that is two levels down from the dataview (i.e. grandchild). I have spent 3 hours trying to get the syntax of determining it's real datasource (i.e. not it's source based on it's...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.