How delete row from DataView when index not given, only value?

R

Ronald S. Cook

Hi,

I have a DataView in which I want to delete a row. I know I can do
MyDataView.Delete(x) where x = the index. But I only have the value of a
column in it (PenNumber, actually).

Isn't there a way I can do something like MyDataView.Find("PenNumber = 123")
to identify the row and then somehow get the index and then delete it?

Thanks!
Ron
 
R

Ronald S. Cook

Nevermind, I found it.

PenUnsequencedDataView.Sort = "PenNumber"

int i = PenUnsequencedDataView.Find("123")
 

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