Results 1 to 3 of 3

Thread: Connecting Dataset to Datagrid

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Connecting Dataset to Datagrid

    hi, i tried to add a datagrid in asp.net. when i use the code;

    Datagrid1.DataSource = Dataset11.tblCustomer


    I can't see the datagrid?? what code should i write?? or what should I do??

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Connecting Dataset to Datagrid

    Shouldn't that be:

    VB Code:
    1. Datagrid1.DataSource = Dataset11.Tables("tblCustomer")

    ?

  3. #3
    Lively Member
    Join Date
    Nov 2003
    Location
    Amsterdam
    Posts
    74

    Re: Connecting Dataset to Datagrid

    Quote Originally Posted by Bluei2
    hi, i tried to add a datagrid in asp.net. when i use the code;

    Datagrid1.DataSource = Dataset11.tblCustomer


    I can't see the datagrid?? what code should i write?? or what should I do??
    Try with

    Code:
    DataGrid1.DataSource = Dataset11.Tables["tblCustomer"].DefaultView;
    DataGrid1.DataBind();
    Everything I code, is a piece for Museum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width