How to add dynamic row in a grid

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default How to add dynamic row in a grid

    When I load the page, I need to add a row in the code behind?


    Dave



    Guest

  2. Similar Questions and Discussions

    1. Dynamic Advanced Data Grid
      Hello, I am having problems to populate my advanced datagrid. Though the grid is getting headers, it is not getting the data from my datasource...
    2. Data Grid Dynamic Cell Colors
      I would like to create a Data Grid where the individual cell colors change based on the number in the cell. For example, numbers between 0 and 1...
    3. grid and subobjects dynamic creation
      Dear all, I have to create an "Outlook like" Calendar view for a whole week. I think (I am a newby) about creating a Grid and to populate it with...
    4. Dynamic Scrollable Grid
      I have a scrollable datagrid which is created by having DataGrid (Header only) <div Overflow=auto> DetailGrid (without header) </div> My...
    5. Dynamic height and pagesize adjustment of Grid
      Hey All, I have an application that uses DATAGRID control. The current grid have remarks field for each row, which can actually take upto 500...
  3. #2

    Default Re: How to add dynamic row in a grid

    Hi Dave,

    Suppose you are using a datatable as your datagrid's data source, you can
    add one row to the datatable, then bind the datatable to datagrid.



    HTH



    <davef@helixpoint.com> wrote in message
    news:ePZBm15tFHA.3252@TK2MSFTNGP10.phx.gbl...
    > When I load the page, I need to add a row in the code behind?
    >
    >
    > Dave
    >
    >
    >

    Elton Wang Guest

  4. #3

    Default Re: How to add dynamic row in a grid

    Hi,

    Solution provided by Dave is good one, but you can do it without making
    postback or binding again the datagrid to datatable.

    Add column elements in datagrid footer and on page load set the footer
    property to visible. if your are specific to add one row only.

    For. Example. Datagrid contains three column ie. ItemTemplate column
    contains textboxes you can add it to datagrid footer and set its visible
    property to true on pageload.

    "Elton Wang" wrote:
    > Hi Dave,
    >
    > Suppose you are using a datatable as your datagrid's data source, you can
    > add one row to the datatable, then bind the datatable to datagrid.
    >
    >
    >
    > HTH
    >
    >
    >
    > <davef@helixpoint.com> wrote in message
    > news:ePZBm15tFHA.3252@TK2MSFTNGP10.phx.gbl...
    > > When I load the page, I need to add a row in the code behind?
    > >
    > >
    > > Dave
    > >
    > >
    > >
    >
    >
    >
    Sachin Saki 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