Datagrid not seen

Results 1 to 2 of 2

Thread: Datagrid not seen

  1. #1
    Join Date
    Dec 1969

    Default Datagrid not seen

    Hi,<BR>Below is the code for displaying an empty datagrid as soon as the Page Loads.<BR>But when I run the application, I don&#039;t see the datagrid at all from my ASP .NET page.<BR><BR>Why is this? Why don&#039;t I see an empty datagrid on the page?<BR>Thanks,<BR><BR>private void Page_Load(object sender, System.EventArgs e)<BR> {<BR> // Put user code to initialize the page here<BR> <BR> this.dataGrid1.Enabled = true;<BR> this.dataGrid1.Visible = true;<BR> this.dataGrid1.DataBind = true;<BR> }

  2. #2
    Join Date
    Dec 1969

    Default RE: Datagrid not seen

    There could be several reasons. To start, turn on paging and add a header and/or footer column so that you know an empty datagrid will show up. Also, make sure your .aspx code for the datagrid has the statement "runat=server" enclosed in the &#060;asp:datagrid&#062; tags. Controls will not show up if that statement is not there.<BR><BR>Good luck.

Posting Permissions

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