[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

Details View not showing?

I have the below Details view. In my codebehind I call:

DetailsView.Databind()

Which does kick off the SQLDatasource Selecting (which has the correct parameters) and the Selected Event which returns a single row.

Yet my Details view is not visible. Any ideas what I am doing wrong?
<asp:DetailsView ID="DetailsView1" runat="server" CssClass="extjs-theme" DataSourceID="SqlDataSource3"
    HeaderText="Details" Width="400px" AutoGenerateRows="false" DataKeyNames="DetailsID"
    Visible="true">
    <RowStyle CssClass="data-row" />
    <AlternatingRowStyle CssClass="alt-data-row" />
    <HeaderStyle CssClass="header-row" />
    <Fields>
	<asp:BoundField DataField="Day" HeaderText="Day" SortExpression="Day" />
	<asp:BoundField DataField="Client" HeaderText="Client" SortExpression="Client" />
	<asp:BoundField DataField="Position" HeaderText="Position" SortExpression="Position" />
	<asp:CommandField ShowEditButton="True" />
    </Fields>
</asp:DetailsView>

Open in new window

0
directxBOB
Asked:
directxBOB
1 Solution
 
Fareed Ali KhanCommented:
Hi,

Why you have AutoGenerateRows = false? set it true.
0
 
directxBOBAuthor Commented:
I am using Boundfields, so AutoGenerateRows can be set to false.

The problem relates to the Ajax Update Panel, once I surrounded the DetailsView in an update panel.

Thanks
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now