DataRow

Discussion in 'ASP .Net Datagrid Control' started by Nabeel Moeen, Feb 27, 2004.

  1. Nabeel Moeen

    Nabeel Moeen Guest

    hello all,
    are the datarow index mantained when DataTable is sorted by clicking on the
    column header?
    that is .. if the first row is index 1, suppose, and after sorting ona
    specific column this row ends up 3rd... is the index still 1?

    and also .. how can i get the index of a particular datarow .. ( assuming i
    hav the dataRow object) ?
     
    Nabeel Moeen, Feb 27, 2004
    #1
    1. Advertising

  2. Your post went unanswered. Have you resolved this issue?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Nabeel Moeen" <> wrote in message
    news:uRJKULT$...
    > hello all,
    > are the datarow index mantained when DataTable is sorted by clicking on

    the
    > column header?
    > that is .. if the first row is index 1, suppose, and after sorting ona
    > specific column this row ends up 3rd... is the index still 1?
    >
    > and also .. how can i get the index of a particular datarow .. ( assuming

    i
    > hav the dataRow object) ?
    >
    >
     
    Alvin Bruney [MVP], Mar 2, 2004
    #2
    1. Advertising

  3. Nabeel Moeen

    Nabeel Moeen Guest

    nopes...
    still waiting for a suggestion!


    "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    news:%...
    > Your post went unanswered. Have you resolved this issue?
    >
    > --
    > Regards,
    > Alvin Bruney [ASP.NET MVP]
    > Got tidbits? Get it here...
    > http://tinyurl.com/3he3b
    > "Nabeel Moeen" <> wrote in message
    > news:uRJKULT$...
    > > hello all,
    > > are the datarow index mantained when DataTable is sorted by clicking on

    > the
    > > column header?
    > > that is .. if the first row is index 1, suppose, and after sorting ona
    > > specific column this row ends up 3rd... is the index still 1?
    > >
    > > and also .. how can i get the index of a particular datarow .. (

    assuming
    > i
    > > hav the dataRow object) ?
    > >
    > >

    >
    >
     
    Nabeel Moeen, Mar 3, 2004
    #3
  4. is the index still 1?
    no

    > > and also .. how can i get the index of a particular datarow .. (

    assuming
    > i
    > > hav the dataRow object) ?


    If you are at that particular row, the index is the same as the row count
    ds.Tables[0].Rows[index_or_current_row_number][col].ToString()

    hth

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Nabeel Moeen" <> wrote in message
    news:...
    > nopes...
    > still waiting for a suggestion!
    >
    >
    > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    > news:%...
    > > Your post went unanswered. Have you resolved this issue?
    > >
    > > --
    > > Regards,
    > > Alvin Bruney [ASP.NET MVP]
    > > Got tidbits? Get it here...
    > > http://tinyurl.com/3he3b
    > > "Nabeel Moeen" <> wrote in message
    > > news:uRJKULT$...
    > > > hello all,
    > > > are the datarow index mantained when DataTable is sorted by clicking

    on
    > > the
    > > > column header?
    > > > that is .. if the first row is index 1, suppose, and after sorting ona
    > > > specific column this row ends up 3rd... is the index still 1?
    > > >
    > > > and also .. how can i get the index of a particular datarow .. (

    > assuming
    > > i
    > > > hav the dataRow object) ?
    > > >
    > > >

    > >
    > >

    >
    >
     
    Alvin Bruney [MVP], Mar 3, 2004
    #4
  5. Nabeel Moeen

    Nabeel Moeen Guest

    but the index does not change when the sorting order of hte rows change by
    clicking on the column header ..
    the row with index 1 might end up being the third row on the grid?

    "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    news:...
    > is the index still 1?
    > no
    >
    > > > and also .. how can i get the index of a particular datarow .. (

    > assuming
    > > i
    > > > hav the dataRow object) ?

    >
    > If you are at that particular row, the index is the same as the row count
    > ds.Tables[0].Rows[index_or_current_row_number][col].ToString()
    >
    > hth
    >
    > --
    > Regards,
    > Alvin Bruney [ASP.NET MVP]
    > Got tidbits? Get it here...
    > http://tinyurl.com/3he3b
    > "Nabeel Moeen" <> wrote in message
    > news:...
    > > nopes...
    > > still waiting for a suggestion!
    > >
    > >
    > > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    > > news:%...
    > > > Your post went unanswered. Have you resolved this issue?
    > > >
    > > > --
    > > > Regards,
    > > > Alvin Bruney [ASP.NET MVP]
    > > > Got tidbits? Get it here...
    > > > http://tinyurl.com/3he3b
    > > > "Nabeel Moeen" <> wrote in message
    > > > news:uRJKULT$...
    > > > > hello all,
    > > > > are the datarow index mantained when DataTable is sorted by clicking

    > on
    > > > the
    > > > > column header?
    > > > > that is .. if the first row is index 1, suppose, and after sorting

    ona
    > > > > specific column this row ends up 3rd... is the index still 1?
    > > > >
    > > > > and also .. how can i get the index of a particular datarow .. (

    > > assuming
    > > > i
    > > > > hav the dataRow object) ?
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Nabeel Moeen, Mar 4, 2004
    #5
  6. Are you sorting thru the dataview, if so that would be the reason since the
    dataview is only a window into the data. If not, i will need to take a
    closer look.

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Nabeel Moeen" <> wrote in message
    news:%...
    > but the index does not change when the sorting order of hte rows change by
    > clicking on the column header ..
    > the row with index 1 might end up being the third row on the grid?
    >
    > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    > news:...
    > > is the index still 1?
    > > no
    > >
    > > > > and also .. how can i get the index of a particular datarow .. (

    > > assuming
    > > > i
    > > > > hav the dataRow object) ?

    > >
    > > If you are at that particular row, the index is the same as the row

    count
    > > ds.Tables[0].Rows[index_or_current_row_number][col].ToString()
    > >
    > > hth
    > >
    > > --
    > > Regards,
    > > Alvin Bruney [ASP.NET MVP]
    > > Got tidbits? Get it here...
    > > http://tinyurl.com/3he3b
    > > "Nabeel Moeen" <> wrote in message
    > > news:...
    > > > nopes...
    > > > still waiting for a suggestion!
    > > >
    > > >
    > > > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    > > > news:%...
    > > > > Your post went unanswered. Have you resolved this issue?
    > > > >
    > > > > --
    > > > > Regards,
    > > > > Alvin Bruney [ASP.NET MVP]
    > > > > Got tidbits? Get it here...
    > > > > http://tinyurl.com/3he3b
    > > > > "Nabeel Moeen" <> wrote in message
    > > > > news:uRJKULT$...
    > > > > > hello all,
    > > > > > are the datarow index mantained when DataTable is sorted by

    clicking
    > > on
    > > > > the
    > > > > > column header?
    > > > > > that is .. if the first row is index 1, suppose, and after sorting

    > ona
    > > > > > specific column this row ends up 3rd... is the index still 1?
    > > > > >
    > > > > > and also .. how can i get the index of a particular datarow .. (
    > > > assuming
    > > > > i
    > > > > > hav the dataRow object) ?
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Alvin Bruney [MVP], Mar 4, 2004
    #6
    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. Ignacio Machin

    Re: Convert DataRow content to bool

    Ignacio Machin, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    374
    Ignacio Machin
    Jul 7, 2003
  2. Eliyahu Goldin

    Re: Convert DataRow content to bool

    Eliyahu Goldin, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    358
    Eliyahu Goldin
    Jul 7, 2003
  3. Ron Vecchi
    Replies:
    1
    Views:
    678
    Ron Vecchi
    Jul 27, 2003
  4. Ron Vecchi
    Replies:
    0
    Views:
    391
    Ron Vecchi
    Jul 30, 2003
  5. Ron Vecchi
    Replies:
    0
    Views:
    415
    Ron Vecchi
    Jul 31, 2003
Loading...

Share This Page