Hi Richard,
Yes, it should, but if you have any questions, send me some code and I'll be
glad to look at it.
Bernie
"Richard" <(E-Mail Removed)> wrote in message
news:zuuCe.5100$(E-Mail Removed)...
> Now that I learned the current row index of the data grid corresponds to
> the
> DataRowView's copy of the bound data table's record, I think I can refine
> it
> with the copywt code below. I use a single table which is not in a dataset
> but I think it will still work.
>
> "Bernie Yaeger" <(E-Mail Removed)> wrote in message
> news:ur%(E-Mail Removed)...
>> Hi Richard,
>>
>> This isn't difficult. When you do a .find on a dataview, it returns the
> row
>> index. The following syntax enables you to update that very row, without
>> looping of any kind:
>> If ifind <> -1 Then ' ie, found it
>>
>> dsprod.Tables(0).Rows(ifind)("copywt") = "abcd"
>>
>> dsprod.Tables(0).Rows(ifind)("onsaledt") = CDate("05/10/2003")
>>
>> End If
>>
>> HTH,
>>
>> Bernie Yaeger
>>
>>
>>
>> "Richard" <(E-Mail Removed)> wrote in message
>> news:NFYBe.744$(E-Mail Removed)...
>> > Windows Forms, csharp, 20 rows in DataTable 14 shown in view after
> filter
>> > applied. For any of the 14 how do I do the datarow or something else
> thing
>> > to access the data in the row of the table behind the view selected on
> the
>> > datagrid.
>> >
>> > DataGrid only gives an index based on the 1-14 visible on the datagrid
> and
>> > I
>> > can't seem to update anything I see in the dataview quickwatch that I
> can
>> > update the underlying row. I could manually keep track of the index to
> the
>> > datatable but if I could figure out how to update the table behind the
>> > dataGrid index of the view without a lot of looping, comparing, etc.
>> >
>> >
>>
>>
>
>
|