Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > DataGrid

Reply
Thread Tools

DataGrid

 
 
bucrepus
Guest
Posts: n/a
 
      07-29-2005
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



 
Reply With Quote
 
 
 
 
bucrepus
Guest
Posts: n/a
 
      07-29-2005
I found the problem, I had to set the datatextfield property to NAMETEXT and
so forth, thanks

"bucrepus" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Datagrid: how cut short display of a long description in a datagrid column Brian K. Williams ASP .Net 0 03-02-2004 08:35 PM
RE: Datagrid: how cut short display of a long description in a datagrid column =?Utf-8?B?U3VyZXNo?= ASP .Net 0 03-02-2004 08:31 PM
datagrid in datagrid BK Kim ASP .Net 1 03-02-2004 06:34 AM
Call Datagrid Command column outside datagrid Dave ASP .Net 0 11-20-2003 11:11 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments