BC30451: Name 'BindDataGrid' is not declared.

Discussion in 'ASP .Net Datagrid Control' started by TJS, Nov 22, 2003.

  1. TJS

    TJS Guest

    trying to allow sorting in a datagrid
    I don't understand error message - can u help ???



    sql:
    =====
    SelectCommand = "SELECT * FROM tblA WHERE id = '" & vid & "'
    order by " & strSortField


    grid control:
    ===============

    <asp:datagrid id="Grid" style="Z-INDEX: 101" runat="server"
    AutoGenerateColumns="False" CellPadding="4" BackColor="White"
    OnPageIndexChanged="DataGrid_Page" AllowPaging="True" ShowFooter="True"
    HorizontalAlign="Center" BorderStyle="None" BorderWidth="1px"
    BorderColor="Silver" DataKeyField="id" AllowSorting="True"
    OnSortCommand="Grid_SortComand" />

    sub:
    ==========

    Sub Grid_SortComand(Sender As Object, E As DataGridSortCommandEventArgs)
    BindDataGrid(e.SortExpression)
    End Sub

    error msg:
    ===============
    Compiler Error Message: BC30451: Name 'BindDataGrid' is not declared.
     
    TJS, Nov 22, 2003
    #1
    1. Advertising

  2. TJS

    Alvin Bruney Guest

    I guess i am asking the same question as the compiler. What is binddatagrid?
    Is this defined somewhere? what does it do. To sort you only need to set the
    sort expression to a dataview object and then bind that object to the
    datagrid. Is that what your binddatagrid does?
    It's complaining because it doesn't see a
    public void BindDataGrid(string sort) method declared anywhere

    hope this helps you
    --


    -----------
    Got TidBits?
    Get it here: www.networkip.net/tidbits
    "TJS" <> wrote in message
    news:e##O#...
    > trying to allow sorting in a datagrid
    > I don't understand error message - can u help ???
    >
    >
    >
    > sql:
    > =====
    > SelectCommand = "SELECT * FROM tblA WHERE id = '" & vid & "'
    > order by " & strSortField
    >
    >
    > grid control:
    > ===============
    >
    > <asp:datagrid id="Grid" style="Z-INDEX: 101" runat="server"
    > AutoGenerateColumns="False" CellPadding="4" BackColor="White"
    > OnPageIndexChanged="DataGrid_Page" AllowPaging="True" ShowFooter="True"
    > HorizontalAlign="Center" BorderStyle="None" BorderWidth="1px"
    > BorderColor="Silver" DataKeyField="id" AllowSorting="True"
    > OnSortCommand="Grid_SortComand" />
    >
    > sub:
    > ==========
    >
    > Sub Grid_SortComand(Sender As Object, E As

    DataGridSortCommandEventArgs)
    > BindDataGrid(e.SortExpression)
    > End Sub
    >
    > error msg:
    > ===============
    > Compiler Error Message: BC30451: Name 'BindDataGrid' is not declared.
    >
    >
     
    Alvin Bruney, Nov 23, 2003
    #2
    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. TJS
    Replies:
    2
    Views:
    335
  2. =?Utf-8?B?V1VU?=

    BC30451: Name 'MyDataList' is not declared.

    =?Utf-8?B?V1VU?=, Apr 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    544
    David Young
    Apr 30, 2005
  3. Replies:
    1
    Views:
    4,089
    Patrick.O.Ige
    Dec 13, 2005
  4. AbraAbraCadabra

    BC30451: Name 'objCDO' is not declared

    AbraAbraCadabra, Sep 1, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,713
    Mark Rae
    Sep 1, 2006
  5. SinCity

    BC30451: Name '__w' is not declared

    SinCity, Sep 3, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    462
    Ray Booysen
    Sep 3, 2006
Loading...

Share This Page