Adding Columns to Datagrid Dynamically

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

  1. #1

    Default Adding Columns to Datagrid Dynamically

    Hello Everyone,
    I have a webpage with three link buttons and a datagrid.
    I would like to populate the same datagrid with different datasources by
    clicking these link buttons, which means I need to be able to dynamically
    add or delete columns to this datagrid through code.
    Can someone help me with this?
    Is this a viable solution?
    Any help will be greatly appreciated...
    Thanks,
    Sal


    Sal Guest

  2. Similar Questions and Discussions

    1. dataGrid - dynamically re-order columns
      I've desperately been trying to dynamically reset the order of columns within my dataGrid. I've been working on it for a few days and have had...
    2. Flex 2.0 Dynamically adding columns to a DataGrid (worked in 1.5)
      I have code that works fine in v1.5 to add columns to a mx.controls.DataGrid but there is no method addColumn() in 2.0 Any help on this would be...
    3. Adding columns dynamically
      hi, I always get the error: Item has already been added. Key in dictionary: "0" Key being added: "0" ----when trying to databind the webgrid with...
    4. Dynamically adding DataGrid columns
      Hi, Does anyone know how to add columns dynamically to a DataGrid. i populate the grid using the .ItemDataBound the current structure of my...
    5. Dynamically Adding Bound Columns Won't Sort
      All- I'm basically creating a user control which contains a datagrid that will be used throughout our application by all pages. My user control...
  3. #2

    Default Re: Adding Columns to Datagrid Dynamically

    based upon the button clicked, change the datasource before binding


    "Sal" <sal@invalid.com> wrote in message
    news:OTpkYOB$DHA.4012@tk2msftngp13.phx.gbl...
    > Hello Everyone,
    > I have a webpage with three link buttons and a datagrid.
    > I would like to populate the same datagrid with different datasources by
    > clicking these link buttons, which means I need to be able to dynamically
    > add or delete columns to this datagrid through code.
    > Can someone help me with this?
    > Is this a viable solution?
    > Any help will be greatly appreciated...
    > Thanks,
    > Sal
    >
    >

    TJS 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