datagriditem

  • Thread starter Thread starter Mike Gaab
  • Start date Start date
M

Mike Gaab

VS 2005
What is the difference between the DataGridItem's ItemIndex and
DataSetIndex? Aren't they the same thing?

Here is what I found on msdn.

ItemIndex
Gets the index of the DataGridItem object from the Items collection of the
DataGrid control.

DataSetIndex
Gets the index of the DataGridItem object from the bound data source.


Mike
 
The ItemIndex is between 0 and the PageSize (if the DataGrid AllowPaging is
set to true). The DataSetIndex is the row position on the datasource which
is between 0 and the DataView.count or DataTabl.Rows.Count. If the datagrid
does not allow paging then both are equal.
 
Phillip Williams said:
The ItemIndex is between 0 and the PageSize (if the DataGrid AllowPaging
is
set to true). The DataSetIndex is the row position on the datasource
which
is between 0 and the DataView.count or DataTabl.Rows.Count. If the
datagrid
does not allow paging then both are equal.


So I can use the DataSetIndex as an index into my business objects
collections.

Thanks, Mike
 

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

Back
Top