Gridview控件在ajax选项卡容器中不可见. [英] Gridview control is not visible in ajax tab container.

查看:89
本文介绍了Gridview控件在ajax选项卡容器中不可见.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="height: 365px">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
        <br />
        <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"

            Height="170px" Width="410px">
            <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
            <ContentTemplate>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"

                    DataSourceID="SqlDataSource1">
                    <Columns>
                        <asp:BoundField DataField="colname" HeaderText="colname"

                            SortExpression="colname" />
                        <asp:BoundField DataField="colno" HeaderText="colno" SortExpression="colno" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server"

                    ConnectionString="<%$ ConnectionStrings:specConnectionString %>"

                    SelectCommand="SELECT * FROM [spectbl]"></asp:SqlDataSource>
            </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
            </asp:TabPanel>
        </asp:TabContainer>

    </div>
    </form>
</body>
</html>





我有一个问题.

我想将gridview控件放置在第一个选项卡内容内.
但是当页面在浏览器中显示时它没有显示.
没有错误发生.我的错是什么请任何人帮助我.
并说明如何通过AJAX选项卡容器内的gridview控件显示数据库.

谢谢





Here I have one problem.

I want to be placed gridview control inside the first tab content.
But it didnt display when the page is displaying in browser.
No errors occur. What is my mistake. Pls anyone help me.
And tell how to display database via gridview control inside AJAX tab container.

Thanks

推荐答案

ConnectionStrings:specConnectionString %> " SelectCommand =" >> < //asp:SqlDataSource > < /ContentTemplate > < /asp:TabPanel > < asp:TabPanel ID =" runat 服务器" HeaderText TabPanel2" < /asp:TabPanel > < /asp:TabContainer > < /div > < /form > < /body > < /html >
ConnectionStrings:specConnectionString %>" SelectCommand="SELECT * FROM [spectbl]"></asp:SqlDataSource> </ContentTemplate> </asp:TabPanel> <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2"> </asp:TabPanel> </asp:TabContainer> </div> </form> </body> </html>





我有一个问题.

我想将gridview控件放置在第一个选项卡内容内.
但是当页面在浏览器中显示时它没有显示.
没有错误发生.我有什么错请任何人帮助我.
并说明如何通过AJAX选项卡容器内的gridview控件显示数据库.

谢谢





Here I have one problem.

I want to be placed gridview control inside the first tab content.
But it didnt display when the page is displaying in browser.
No errors occur. What is my mistake. Pls anyone help me.
And tell how to display database via gridview control inside AJAX tab container.

Thanks


您是否将GridView绑定到数据源,并确保数据中具有字段名称.

TanvTech
Did you bind the GridView to your datasource and also make sure you have the field name in the data.

TanvTech


这篇关于Gridview控件在ajax选项卡容器中不可见.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆