all groups > asp.net datagrid control > july 2005 >
You're in the

asp.net datagrid control

group:

NEWBIE & datagrid


NEWBIE & datagrid bucrepus
7/29/2005 9:58:38 AM
asp.net datagrid control: 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


Re: NEWBIE & datagrid bucrepus
7/29/2005 2:00:11 PM
I found the problem, I had to set the datatextfield property to NAMETEXT and
so forth, thanks
[quoted text, click to view]

Re: NEWBIE & datagrid Elton Wang
7/29/2005 2:09:56 PM
Could you show your datagrid html code?


[quoted text, click to view]

AddThis Social Bookmark Button