problem with dataviews and its datatable

F

fanor

Hi guys,

I understand that a dataview is kind of a collection of indexes to the
records of the table. So, if I have an index of a record in the
dataview I should be able to know the position of that record on the
table. see the code

..........
..........
dt=this.dsCM1.clients;
System.Data.DataView dv = dt.DefaultView;

dv.Sort="phone";
idx=dv.Find("703-231 8765");

NOw i want to move in the table to that record , if I do something like

this.BindingContext[this.dsCM1,"clients"].Position = idx;

doesn't work because idx points to a record in the dataview not in
table clients.


TIA
 
M

Marina

I'm not sure what you mean. There is no way as far as I know, to find out
the position of a record in a datatable, based on knowing it's index in the
view.

If you want, you can bind to the view instead of the underlying datatable,
to get the sort to show up, etc. But it's not clear as to what you are even
trying to accomplish here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top