datagriditem

Discussion in 'ASP .Net' started by Mike Gaab, Apr 2, 2006.

  1. Mike Gaab

    Mike Gaab Guest

    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



    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mike Gaab, Apr 2, 2006
    #1
    1. Advertising

  2. 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.
    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "Mike Gaab" wrote:

    > 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
    >
    >
    >
    > ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    > http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    > ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
    >
     
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=, Apr 2, 2006
    #2
    1. Advertising

  3. Mike Gaab

    Mike Gaab Guest

    "Phillip Williams" <> wrote in message
    news:...
    > 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



    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Mike Gaab, Apr 2, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Perot
    Replies:
    0
    Views:
    384
    Paul Perot
    Dec 12, 2003
  2. Richard Loupatty

    Visibility of selectedindex of a datagriditem

    Richard Loupatty, Jan 12, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    790
    Richard Loupatty
    Jan 12, 2004
  3. =?Utf-8?B?U291cmkgQ2hhbGxh?=

    Accessing DataGridItem in ItemCreated Event.

    =?Utf-8?B?U291cmkgQ2hhbGxh?=, Aug 28, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    4,779
    Souri Challa
    Aug 28, 2004
  4. =?Utf-8?B?U2hhd24=?=

    Set DataGridItem dirty

    =?Utf-8?B?U2hhd24=?=, Sep 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    342
    =?Utf-8?B?U2hhd24=?=
    Sep 7, 2004
  5. Samuel Chowdhuri
    Replies:
    1
    Views:
    312
    Alvin Bruney
    Oct 20, 2003
Loading...

Share This Page