Modifying rows [still problems :-( ]
Hi folks! Going crazy here. I got a dataset filled and now I need to modify a row of one of its tables. I know I can do it like this:
Dataset.Table1.Rows(x).("Name")="John"
Being x the row index. Now, I DON'T KNOW THE ROW INDEX of the row I want to modify, I know which row I want to change but HOW DO I FIND OUT ITS ROW INDEX SO THAT I CAN RUN THE COMMAND ABOVE?
Thanks for your help!
Re: Modifying rows [still problems :-( ]
There is a bunch of command for selecting, updating and deleting rows of a dataset all of them used the row index... (like the command above) SO THERE HAS TO BE A WAY OF GETTING THE ROW INDEX, something like Dataset.Table.Rows.GetRowIndex("IdCustomer=2")...
Any ideas? I appreciatte.
Re: Modifying rows [still problems :-( ]
icurrentpos=me.bindingcontext(dataset,"table").position '+1 if you need an offset
Re: Modifying rows [still problems :-( ]
So you're saying you know the primary key of the row? If so:
VB Code:
Dataset.Table1.Rows.Find(pkValue)("Name")="John"
Re: Modifying rows [still problems :-( ]
Quote:
icurrentpos=me.bindingcontext(dataset,"table").position '+1 if you need an offset
and how does this relates to us :confused: