DataGrid migration (more detail)

Discussion in 'ASP .Net Web Controls' started by Johnpc, Mar 3, 2005.

  1. Johnpc

    Johnpc Guest

    I need to copy the vb code for a datagrid out of one solution into another.

    so I copyied the .aspx and aspx.vb files, but when I build I get the
    following error

    Type 'TextBox' is not defined.

    from the following

    Private Sub salesLinksGrid_UpdateCommand(ByVal source As Object, ByVal e As
    System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    salesLinksGrid.UpdateCommand

    'retrieve textbox control from saleslinksgrid
    Dim txtFactor = CType(e.Item.Cells(2).Controls(0), TextBox)
    'retrieve values to produce the primary key..
    ....
    ....

    It's as if something is not registered in the project i've copied the code
    too, but I just dont know.....

    when I run the project anyway with the build error I get the following

    Exception Details: System.NullReferenceException: Object reference not set
    to an instance of an object.

    Stack Trace:


    [NullReferenceException: Object reference not set to an instance of an
    object.]
    stockcontrolx.SalesLinks.bindGrid() in
    C:\scx\SalesLinksASPX\SalesLinks.aspx.vb:46


    which is a line of code which sets the SQL command text

    Can anyone advise

    Thanks
    Johnpc, Mar 3, 2005
    #1
    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. John Dalberg
    Replies:
    0
    Views:
    381
    John Dalberg
    Dec 20, 2005
  2. Arun Kumar Menon

    Master Detail detail

    Arun Kumar Menon, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    196
    Arun Kumar Menon
    Aug 6, 2003
  3. John Dalberg

    How to get key value in a master datagrid from a detail datagrid?

    John Dalberg, Dec 20, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    132
    John Dalberg
    Dec 20, 2005
  4. Frederik Borg

    ASp.net data binding: Master-detail-detail

    Frederik Borg, Jun 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    355
    Frederik Borg
    Jun 9, 2006
  5. Boni Satani
    Replies:
    0
    Views:
    162
    Boni Satani
    Jan 9, 2014
Loading...

Share This Page