Looping through rows in a DataGrid

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Looping through rows in a DataGrid

    Hi,

    I have a data grid in my application. It has 20 rows and I
    have set the page size as 5. I have a Submit button on my
    form and when I click on Submit, I need to loop through
    the rows in the datagrid. Using the items collection just
    gives me the 5 rows that are displayed on the screen.
    Is there any way of looping through all the rows in the
    grid?

    Thanks,
    Diva
    Diva Guest

  2. Similar Questions and Discussions

    1. Looping through all rows and columns (to get sub-totals for each column and row)
      Is there a way to loop through all rows and columns in order to fill a sub-totaled columns and a sub-totaled row (footer). I thought about doing...
    2. Moving Rows in a datagrid.
      Does anyone know of a good example that shows me how I can move rows in a datagrid? For example Click and Drag row 5 and drop it on row 2 to insert...
    3. DataGrid with buttons in rows
      I was wondering if this was possible, how does one place buttons or any other control in a row of a datagrid (each row actually). I even tried...
    4. Two rows for each record in DataGrid
      Hello all, I have posted similar question in another group a while ago (before this group came into existence) but would like to double-check on...
    5. Adding rows to a Datagrid
      Jason, Thanks for the reply. Yes... it would be possible... but I also don't want to commit deletes/changes to the child records until they are...
  3. #2

    Default Re: Looping through rows in a DataGrid

    Diva,

    Instead of looping through the rows of the grid (which only contains five)
    try looping through the dataset or datatable that's bound to it instead.

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche
    "Diva" <moonlight_diva_17uk@yahoo.com> wrote in message
    news:00c901c35207$3e3930d0$a401280a@phx.gbl...
    > Hi,
    >
    > I have a data grid in my application. It has 20 rows and I
    > have set the page size as 5. I have a Submit button on my
    > form and when I click on Submit, I need to loop through
    > the rows in the datagrid. Using the items collection just
    > gives me the 5 rows that are displayed on the screen.
    > Is there any way of looping through all the rows in the
    > grid?
    >
    > Thanks,
    > Diva

    S. Justin Gengo Guest

Posting Permissions

  • You may not post new threads
  • You may 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