I can't see my datagrid when I run it from my project in
VisualStudio.net, but when I work with it locally thru
http://localhost/myproject/mydgrid.aspx, it works fine.:
datagrid coding:
//////////////////////////////
<asp:datagrid id="dgboard" Showfooter="true" BorderColor="#e5ecf9"
runat="server" AutoGenerateColumns="false" Font-Name="verdana"
Font-Size="smaller">
<HeaderStyle BackColor="#000000" ForeColor="#FFFFFF"/>
<FooterStyle BackColor="#e5ecf9" ForeColor="#000000"/>
<AlternatingItemStyle BackColor="#C0C0C0" />
<Columns>
<asp:BoundColumn
DataField="SalesRep_ID"
HeaderText="Rep ID"
ReadOnly="true">
</asp:BoundColumn>
<asp:BoundColumn
DataField="Deal_ID"
HeaderText="Deal ID">
</asp:BoundColumn>
<asp:BoundColumn
DataField="BoardDate"
DataFormatString="{0:d}"
HeaderText="Deal Date">
</asp:BoundColumn>
<asp:BoundColumn
DataField="lname"
HeaderText="Rep Last Name">
</asp:BoundColumn>
<asp:BoundColumn
DataField="dollars"
DataFormatString="{0:C}"
HeaderText="Amount$"
</asp:BoundColumn>
</Columns>
</asp:datagrid>
//////////////////////////
CODEBEHIND :
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace SportsMgrProject
{
/// <summary>
/// Summary description for btresults1.
/// </summary>
public class btresults1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.HyperLink HyperLink1;
protected System.Web.UI.WebControls.HyperLink HyperLink2;
protected System.Web.UI.WebControls.DataGrid dgboard;
protected System.Web.UI.WebControls.HyperLink HyperLink3;
protected System.Web.UI.WebControls.HyperLink HyperLink4;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
/////////////////////////
Thanks
Chumley