DataSet: no MoveNext or any indexing at all
-
i send a RowData object from a DataSet (dataset.getTable().Rows[x]) to a form that then displays that row in unbound controls. That form has a navigate forward and back button. how do i find out the row's index in a dataset so that i may 'movenext' or even iterate from that point? the problem is that the form does not know the row index and it cannot call back to the owner form. burnt:confused:
-
i send a RowData object from a DataSet (dataset.getTable().Rows[x]) to a form that then displays that row in unbound controls. That form has a navigate forward and back button. how do i find out the row's index in a dataset so that i may 'movenext' or even iterate from that point? the problem is that the form does not know the row index and it cannot call back to the owner form. burnt:confused:
You'll have to somehow pass the row index to the child form. I would work with the DataTable object in the child form, then you could do your iteration through that, as well as add new rows to the table. You can get the DataTable object from the DataRow object by the DataRow's Table property. James Simplicity Rules!
-
You'll have to somehow pass the row index to the child form. I would work with the DataTable object in the child form, then you could do your iteration through that, as well as add new rows to the table. You can get the DataTable object from the DataRow object by the DataRow's Table property. James Simplicity Rules!
but i dont have the index and can not change the api i am using. the question is, and remains, how do i get the index of a row in a dataset given a DataRow object, and a DataSet object, and NOT the index of the current RowData object. if i can say dataset.Table().rows[20] and get a DataRow object, shouldnt i be able to easily code dataset.Table().rows[_row.rowID + 1] ? the rowID property shows up in the watch window, but why is private? how do i get to it?