DataGrid

Discussion in 'ASP .Net Web Controls' started by bucrepus, Jul 29, 2005.

  1. bucrepus

    bucrepus Guest

    I created a simple datagrid that was populated from a SQL stored procedure.

    SP
    Select LNAME + FNAME as NAMETEXT, DATEHIRE as DATETEXT from employees

    did this in ASP.NET>>
    tmpSQL.SQLDB.Open()
    tmpSQL.SQLCmd.CommandType = CommandType.StoredProcedure
    tmpSQL.SQLCmd.CommandText = "SP_GETNAMES"
    Dim DS As DataSet = New DataSet
    Dim DA As SqlDataAdapter = New SqlDataAdapter(tmpSQL.SQLCmd.CommandText,
    tmpSQL.SQLDB)
    DA.Fill(DS)
    DataGrid1.DataSource = DS
    DataGrid1.DataBind()

    works fine with AUOTGENERATE col's on., Displays the data....

    But if a make the bound columns in the wizard. ( so I can format the the
    date), nothing displays!!??

    what other code must I do to make the records display when I manually key in
    the column names?

    Thanks BUC
     
    bucrepus, Jul 29, 2005
    #1
    1. Advertising

  2. bucrepus

    bucrepus Guest

    I found the problem, I had to set the datatextfield property to NAMETEXT and
    so forth, thanks

    "bucrepus" <> wrote in message
    news:...
    > I created a simple datagrid that was populated from a SQL stored

    procedure.
    >
    > SP
    > Select LNAME + FNAME as NAMETEXT, DATEHIRE as DATETEXT from employees
    >
    > did this in ASP.NET>>
    > tmpSQL.SQLDB.Open()
    > tmpSQL.SQLCmd.CommandType = CommandType.StoredProcedure
    > tmpSQL.SQLCmd.CommandText = "SP_GETNAMES"
    > Dim DS As DataSet = New DataSet
    > Dim DA As SqlDataAdapter = New SqlDataAdapter(tmpSQL.SQLCmd.CommandText,
    > tmpSQL.SQLDB)
    > DA.Fill(DS)
    > DataGrid1.DataSource = DS
    > DataGrid1.DataBind()
    >
    > works fine with AUOTGENERATE col's on., Displays the data....
    >
    > But if a make the bound columns in the wizard. ( so I can format the the
    > date), nothing displays!!??
    >
    > what other code must I do to make the records display when I manually key

    in
    > the column names?
    >
    > Thanks BUC
    >
    >
    >
     
    bucrepus, Jul 29, 2005
    #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. Dave
    Replies:
    0
    Views:
    449
  2. BK Kim

    datagrid in datagrid

    BK Kim, Feb 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    545
    Alvin Bruney [MVP]
    Mar 2, 2004
  3. =?Utf-8?B?U3VyZXNo?=
    Replies:
    0
    Views:
    526
    =?Utf-8?B?U3VyZXNo?=
    Mar 2, 2004
  4. Brian K. Williams
    Replies:
    0
    Views:
    545
    Brian K. Williams
    Mar 2, 2004
  5. Andreas Klemt
    Replies:
    0
    Views:
    310
    Andreas Klemt
    Oct 8, 2003
Loading...

Share This Page