Professional Web Applications Themes

Creation and Positioning DataGrid Columns at runtime. - ASP.NET Data Grid Control

Hello, I need to create a DataGrid that looks something like this... <HyperLinkColumn><ButtonColumn><Data><Data><Button Column> but I can only seem to produce a DataGrid as below... <HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data> Can anyone help? Many thanks in advance. Alan...

  1. #1

    Default Creation and Positioning DataGrid Columns at runtime.

    Hello,
    I need to create a DataGrid that looks something like this...

    <HyperLinkColumn><ButtonColumn><Data><Data><Button Column>

    but I can only seem to produce a DataGrid as below...

    <HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>

    Can anyone help?
    Many thanks in advance.

    Alan


    Alan Seunarayan Guest

  2. #2

    Default Re: Creation and Positioning DataGrid Columns at runtime.

    it needs to be done in the 'Code-Behind'.

    "Eliyahu Goldin" <removemeegoldinmonarchmed.com> wrote in message
    news:%23SfiZxokFHA.2852TK2MSFTNGP15.phx.gbl...
    > Alan,
    >
    > What happens if you just change the order of the columns in the .aspx
    > file?
    >
    > Eliyahu
    >
    > "Alan Seunarayan" <so0nazntlw0rld.c0m> wrote in message
    > news:u5IFe.3481$hc4.2392newsfe6-win.ntli.net...
    >> Hello,
    >> I need to create a DataGrid that looks something like this...
    >>
    >> <HyperLinkColumn><ButtonColumn><Data><Data><Button Column>
    >>
    >> but I can only seem to produce a DataGrid as below...
    >>
    >> <HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>
    >>
    >> Can anyone help?
    >> Many thanks in advance.
    >>
    >> Alan
    >>
    >>
    >
    >

    Alan Seunarayan Guest

  3. #3

    Default Re: Creation and Positioning DataGrid Columns at runtime.

    Alan,

    What happens if you just change the order of the columns in the .aspx file?

    Eliyahu

    "Alan Seunarayan" <so0nazntlw0rld.c0m> wrote in message
    news:u5IFe.3481$hc4.2392newsfe6-win.ntli.net...
    > Hello,
    > I need to create a DataGrid that looks something like this...
    >
    > <HyperLinkColumn><ButtonColumn><Data><Data><Button Column>
    >
    > but I can only seem to produce a DataGrid as below...
    >
    > <HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>
    >
    > Can anyone help?
    > Many thanks in advance.
    >
    > Alan
    >
    >

    Eliyahu Goldin Guest

  4. #4

    Default Figured it out....Re: Creation and Positioning DataGrid Columns at runtime.

    in the ItemDataBound event of a DataGrid add the following....

    TableCell deleteCell = e.Item.Cells[1]; // rendered ButtonColumn

    e.Item.Cells.Add(deleteCell);



    "Alan Seunarayan" <so0nazntlw0rld.c0m> wrote in message
    news:u5IFe.3481$hc4.2392newsfe6-win.ntli.net...
    > Hello,
    > I need to create a DataGrid that looks something like this...
    >
    > <HyperLinkColumn><ButtonColumn><Data><Data><Button Column>
    >
    > but I can only seem to produce a DataGrid as below...
    >
    > <HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>
    >
    > Can anyone help?
    > Many thanks in advance.
    >
    > Alan
    >

    Alan Seunarayan Guest

  5. #5

    Default Re: Creation and Positioning DataGrid Columns at runtime.

    Are you creating column dynamically? What happens if you change the column
    creating order?

    Eliyahu

    "Alan Seunarayan" <so0nazntlw0rld.c0m> wrote in message
    news:yPIFe.8907$m4.8365newsfe1-win.ntli.net...
    > it needs to be done in the 'Code-Behind'.
    >
    > "Eliyahu Goldin" <removemeegoldinmonarchmed.com> wrote in message
    > news:%23SfiZxokFHA.2852TK2MSFTNGP15.phx.gbl...
    > > Alan,
    > >
    > > What happens if you just change the order of the columns in the .aspx
    > > file?
    > >
    > > Eliyahu
    > >
    > > "Alan Seunarayan" <so0nazntlw0rld.c0m> wrote in message
    > > news:u5IFe.3481$hc4.2392newsfe6-win.ntli.net...
    > >> Hello,
    > >> I need to create a DataGrid that looks something like this...
    > >>
    > >> <HyperLinkColumn><ButtonColumn><Data><Data><Button Column>
    > >>
    > >> but I can only seem to produce a DataGrid as below...
    > >>
    > >> <HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>
    > >>
    > >> Can anyone help?
    > >> Many thanks in advance.
    > >>
    > >> Alan
    > >>
    > >>
    > >
    > >
    >
    >

    Eliyahu Goldin Guest

  6. #6

    Default RE: Figured it out....Re: Creation and Positioning DataGrid Columns at

    Post the code where you are creating the columns

    "Alan Seunarayan" wrote:
    > in the ItemDataBound event of a DataGrid add the following....
    >
    > TableCell deleteCell = e.Item.Cells[1]; // rendered ButtonColumn
    >
    > e.Item.Cells.Add(deleteCell);
    >
    >
    >
    > "Alan Seunarayan" <so0nazntlw0rld.c0m> wrote in message
    > news:u5IFe.3481$hc4.2392newsfe6-win.ntli.net...
    > > Hello,
    > > I need to create a DataGrid that looks something like this...
    > >
    > > <HyperLinkColumn><ButtonColumn><Data><Data><Button Column>
    > >
    > > but I can only seem to produce a DataGrid as below...
    > >
    > > <HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>
    > >
    > > Can anyone help?
    > > Many thanks in advance.
    > >
    > > Alan
    > >
    >
    >
    >
    John Teague Guest

Similar Threads

  1. Replies: 0
    Last Post: April 5th, 03:58 AM
  2. Changing Datagrid columns at runtime
    By Georg Scholz in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: September 28th, 07:11 AM
  3. ASP.NET DataGrid and TextBox creation at runtime?
    By Arulraja in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: November 7th, 03:58 PM
  4. Adding Columns at runtime in datagrid control
    By Naveed Alam in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: September 5th, 08:23 AM
  5. Runtime control creation
    By Domien Holthof in forum ASP.NET General
    Replies: 0
    Last Post: July 1st, 12:50 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