DataBind

Discussion in 'ASP .Net Datagrid Control' started by pete, Jul 28, 2003.

  1. pete

    pete Guest

    I am using a "ArrayList" that contains valid data, and
    the ".DataSource = " (to the ArrayList) works just fine,
    but when I do the ".DataBind()", I get the run-time error:

    "DataGrid with id 'grd_loop' could not automatically
    generate any columns from the selected data source."

    Does anyone know what can cause this? The fields of the
    Class that are stored in the ArrayList are all defined
    as "Public ReadOnly Property", "Get", if that's any help.

    Thanks in advance.
    Pete
    pete, Jul 28, 2003
    #1
    1. Advertising

  2. pete

    Saravana Guest

    Can you send your aspx code, are you using databinder.eval for binding??? if
    not use that and try.

    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "pete" <> wrote in message
    news:04d501c3554f$a5281270$...
    > I am using a "ArrayList" that contains valid data, and
    > the ".DataSource = " (to the ArrayList) works just fine,
    > but when I do the ".DataBind()", I get the run-time error:
    >
    > "DataGrid with id 'grd_loop' could not automatically
    > generate any columns from the selected data source."
    >
    > Does anyone know what can cause this? The fields of the
    > Class that are stored in the ArrayList are all defined
    > as "Public ReadOnly Property", "Get", if that's any help.
    >
    > Thanks in advance.
    > Pete
    Saravana, Jul 29, 2003
    #2
    1. Advertising

  3. pete

    pete Guest


    >-----Original Message-----
    >Can you send your aspx code, are you using

    databinder.eval for binding??? if
    >not use that and try.
    >
    >--
    >Saravana
    >Microsoft India Community Star,
    >MCAD,SE,SD,DBA.


    here is aspx file:
    <%@ Page Language="vb" AutoEventWireup="false"
    Codebehind="TL_RepSummary.aspx.vb"
    Inherits="TagLinkWebApp0.TL_RepSummary"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
    Transitional//EN">
    <HTML>
    <HEAD>
    <title>TL_RepSummary</title>
    <meta content="Microsoft Visual
    Studio .NET 7.1" name="GENERATOR">
    <meta content="Visual Basic .NET 7.1"
    name="CODE_LANGUAGE">
    <meta content="JavaScript"
    name="vs_defaultClientScript">
    <meta
    content="http://schemas.microsoft.com/intellisense/ie5"
    name="vs_targetSchema">
    </HEAD>
    <body bgColor="#ccff66">
    <form id="Form1" method="post"
    runat="server">
    <asp:image id="img_logo" style="Z-
    INDEX: 103; LEFT: 32px; POSITION: absolute; TOP: 32px"
    runat="server"
    Width="272px"
    Height="176px"
    ImageUrl="file:///C:\Icons\MyClients\group.BMP"
    BorderColor="Black"></asp:image>
    <asp:label id="lbl_matno" style="Z-
    INDEX: 106; LEFT: 488px; POSITION: absolute; TOP: 296px"
    runat="server"
    Width="424px" Height="24px"></asp:label>
    <asp:label id="lbl_p1" style="Z-
    INDEX: 104; LEFT: 344px; POSITION: absolute; TOP: 296px"
    runat="server"
    Width="128px"
    Height="24px">Material Type:</asp:label>
    <asp:label id="lbl_inv" style="Z-
    INDEX: 105; LEFT: 344px; POSITION: absolute; TOP: 232px"
    runat="server"
    Width="609px"
    Height="48px" Visible="False">message</asp:label>
    <asp:image id="img_tl" style="Z-
    INDEX: 101; LEFT: 344px; POSITION: absolute; TOP: 32px"
    runat="server"
    Width="568px"
    Height="104px"
    ImageUrl="file:///C:\BCI\RFID\TagLink\TagLinkLogoTM.jpg"
    BorderColor="Black"></asp:image>
    <asp:label id="lbl_title" style="Z-
    INDEX: 102; LEFT: 344px; POSITION: absolute; TOP: 160px"
    runat="server"
    Width="352px" Height="32px" Font-Bold="True" Font-Size="X-
    Large">Asset Summary</asp:label>
    <asp:datagrid id="grd_loop"
    style="Z-INDEX: 107; LEFT: 32px; POSITION: absolute; TOP:
    336px" runat="server"
    Width="896px"
    Height="160px"></asp:datagrid>
    <asp:datagrid id="grd_qtys"
    style="Z-INDEX: 108; LEFT: 32px; POSITION: absolute; TOP:
    504px" runat="server"
    Width="896px"
    Height="168px"></asp:datagrid>
    <asp:label id="Label1" style="Z-
    INDEX: 109; LEFT: 368px; POSITION: absolute; TOP: 696px"
    runat="server"
    Width="224px"
    Height="40px">Label</asp:label>
    <asp:datagrid id="grd_stats"
    runat="server"></asp:datagrid>
    </form>
    </body>
    </HTML>
    pete, Jul 29, 2003
    #3
  4. pete

    pete Guest


    >-----Original Message-----
    >Can you send your aspx code, are you using

    databinder.eval for binding??? if
    >not use that and try.
    >
    >--
    >Saravana
    >Microsoft India Community Star,
    >MCAD,SE,SD,DBA.
    >

    I found the problem. I didn't have the Properties of the
    ArrayList Class "strongly typed"
    pete, Jul 29, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ante Perkovic

    Me.databind() stops button handlers?

    Ante Perkovic, Jun 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    904
    Ante Perkovic
    Jun 30, 2003
  2. Admin
    Replies:
    0
    Views:
    654
    Admin
    Jul 8, 2003
  3. Jay

    Databind

    Jay, Jul 25, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    713
    S. Justin Gengo
    Jul 28, 2003
  4. Kimberly Walker

    Dropdownlist adding data after databind

    Kimberly Walker, Oct 23, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    452
    Kimberly Walker
    Oct 23, 2003
  5. Michael
    Replies:
    0
    Views:
    213
    Michael
    Dec 29, 2003
Loading...

Share This Page