Professional Web Applications Themes

DataRow - ASP.NET Data Grid Control

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) ?...

  1. #1

    Default DataRow

    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 Guest

  2. #2

    Default Re: DataRow

    Your post went unanswered. Have you resolved this issue?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    [url]http://tinyurl.com/3he3b[/url]
    "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    news:uRJKULT$DHA.2348TK2MSFTNGP09.phx.gbl...
    > 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] Guest

  3. #3

    Default Re: DataRow

    nopes...
    still waiting for a suggestion!


    "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    news:%2387WecGAEHA.3308TK2MSFTNGP10.phx.gbl...
    > Your post went unanswered. Have you resolved this issue?
    >
    > --
    > Regards,
    > Alvin Bruney [ASP.NET MVP]
    > Got tidbits? Get it here...
    > [url]http://tinyurl.com/3he3b[/url]
    > "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    > news:uRJKULT$DHA.2348TK2MSFTNGP09.phx.gbl...
    > > 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 Guest

  4. #4

    Default Re: DataRow

    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...
    [url]http://tinyurl.com/3he3b[/url]
    "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    news:eDqgXSPAEHA.2216TK2MSFTNGP10.phx.gbl...
    > nopes...
    > still waiting for a suggestion!
    >
    >
    > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    > news:%2387WecGAEHA.3308TK2MSFTNGP10.phx.gbl...
    > > Your post went unanswered. Have you resolved this issue?
    > >
    > > --
    > > Regards,
    > > Alvin Bruney [ASP.NET MVP]
    > > Got tidbits? Get it here...
    > > [url]http://tinyurl.com/3he3b[/url]
    > > "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    > > news:uRJKULT$DHA.2348TK2MSFTNGP09.phx.gbl...
    > > > 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] Guest

  5. #5

    Default Re: DataRow

    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:ObU8JDTAEHA.580TK2MSFTNGP11.phx.gbl...
    > 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...
    > [url]http://tinyurl.com/3he3b[/url]
    > "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    > news:eDqgXSPAEHA.2216TK2MSFTNGP10.phx.gbl...
    > > nopes...
    > > still waiting for a suggestion!
    > >
    > >
    > > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    > > news:%2387WecGAEHA.3308TK2MSFTNGP10.phx.gbl...
    > > > Your post went unanswered. Have you resolved this issue?
    > > >
    > > > --
    > > > Regards,
    > > > Alvin Bruney [ASP.NET MVP]
    > > > Got tidbits? Get it here...
    > > > [url]http://tinyurl.com/3he3b[/url]
    > > > "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    > > > news:uRJKULT$DHA.2348TK2MSFTNGP09.phx.gbl...
    > > > > 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 Guest

  6. #6

    Default Re: DataRow

    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...
    [url]http://tinyurl.com/3he3b[/url]
    "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    news:%23Qr4zLdAEHA.1032TK2MSFTNGP10.phx.gbl...
    > 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:ObU8JDTAEHA.580TK2MSFTNGP11.phx.gbl...
    > > 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...
    > > [url]http://tinyurl.com/3he3b[/url]
    > > "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    > > news:eDqgXSPAEHA.2216TK2MSFTNGP10.phx.gbl...
    > > > nopes...
    > > > still waiting for a suggestion!
    > > >
    > > >
    > > > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    > > > news:%2387WecGAEHA.3308TK2MSFTNGP10.phx.gbl...
    > > > > Your post went unanswered. Have you resolved this issue?
    > > > >
    > > > > --
    > > > > Regards,
    > > > > Alvin Bruney [ASP.NET MVP]
    > > > > Got tidbits? Get it here...
    > > > > [url]http://tinyurl.com/3he3b[/url]
    > > > > "Nabeel Moeen" <nabeel.moeen2bt.com.pk> wrote in message
    > > > > news:uRJKULT$DHA.2348TK2MSFTNGP09.phx.gbl...
    > > > > > 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] Guest

Similar Threads

  1. Creating Datarow
    By Arne in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: November 15th, 07:45 PM
  2. Using Datarow, how do I get the data out of each
    By Dave in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: February 13th, 01:50 PM
  3. Is e.Item.DataItem (DataRow) available on postback??
    By David Adams in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: October 13th, 06:47 PM
  4. DataRow, WebService question
    By Tim Mulholland in forum ASP.NET Web Services
    Replies: 2
    Last Post: August 7th, 06:17 PM
  5. Convert DataRow content to bool
    By Ignacio Machin in forum ASP.NET General
    Replies: 1
    Last Post: July 7th, 01:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139