Professional Web Applications Themes

difference between these 2? - ASP.NET Data Grid Control

In some examples I am looking through they are speaking of datagrids and datalists (this is not the question :) For the datalist a column is populated using <%# Databinder.Eval(container.Dataitem, "some column") %> For the datagrid... <asp:Boundcolumn Datafield="some column" /> Is there any difference between the 2? I'm assuming that both are saying look at the recordset (sorry classic asp terminology :), find this column data and populate this column with it? Are they specific to the 2 controls or can they be mixed and matched? Advantages/disadvantages of either? Sorry to be vague, just trying to get my head around ...

  1. #1

    Default difference between these 2?

    In some examples I am looking through they are speaking of datagrids
    and datalists (this is not the question :)

    For the datalist a column is populated using
    <%# Databinder.Eval(container.Dataitem, "some column") %>
    For the datagrid...
    <asp:Boundcolumn Datafield="some column" />

    Is there any difference between the 2?
    I'm assuming that both are saying look at the recordset (sorry classic
    asp terminology :), find this column data and populate this column
    with it?

    Are they specific to the 2 controls or can they be mixed and matched?
    Advantages/disadvantages of either?
    Sorry to be vague, just trying to get my head around them.
    Jay Guest

  2. #2

    Default Re: difference between these 2?

    Jay wrote:
    > In some examples I am looking through they are speaking of datagrids
    > and datalists (this is not the question :)
    >
    > For the datalist a column is populated using
    > <%# Databinder.Eval(container.Dataitem, "some column") %>
    > For the datagrid...
    > <asp:Boundcolumn Datafield="some column" />
    >
    > Is there any difference between the 2?
    > I'm assuming that both are saying look at the recordset (sorry classic
    > asp terminology :), find this column data and populate this column
    > with it?
    >
    > Are they specific to the 2 controls or can they be mixed and matched?
    > Advantages/disadvantages of either?
    > Sorry to be vague, just trying to get my head around them.
    A BoundColumn will automatically generate a label for
    the item, and a TextBox when the item is in Edit mode.

    You can use the first type of explicit databinding also in a
    datagrid. You then put it in a TemplateColumn.

    The disadvantage of a BoundColumn is that you don't have any
    control about the layout, because it is automatic. For instance,
    you can't set the width of the TextBox in Edit mode.
    The advantage is that it's all automatic, you can get the datagrid
    working in a minute.

    --

    Jos


    Jos Guest

Similar Threads

  1. what's the difference?
    By wrrn in forum Macromedia Dreamweaver
    Replies: 9
    Last Post: December 4th, 02:09 AM
  2. difference
    By SMITTY in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: November 28th, 09:42 PM
  3. Difference between ASP & PHP
    By Peter van Rijt in forum PHP Development
    Replies: 11
    Last Post: January 21st, 11:12 AM
  4. what is the difference....
    By Disco in forum PHP Development
    Replies: 1
    Last Post: September 4th, 07:39 AM

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