Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need to add tabcontainer inside a gridview which retrives data from sql server.Could you please help me to do this?
Currently iam getting the following error in the gridview
"
Couldnot find any resources appropriate for the specified culture or the neutral culture.makesure "AjaxControlToolkit.propertied.resources.resources"was correctly embedde or linkined into assembly"AjaxControlToolkit"atcompile time,or that all the satellite assemblies required are loadable and fully signed."


This is the code i have given
XML
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
            PageSize="6" Height="1173px" Width="705px"
            onselectedindexchanged="GridView1_SelectedIndexChanged">
       <Columns>
       <asp:TemplateField>
       <ItemTemplate>

        <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2">
        <ajaxToolkit:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel runat="server" HeaderText="TabPanel2" ID="TabPanel2">
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
        </ajaxToolkit:TabPanel>
        </ajaxToolkit:TabContainer>

       </ItemTemplate>
       </asp:TemplateField>
       </Columns>

        </asp:GridView>


[edit]corrected code block[/edit]
Posted
Updated 18-Nov-12 11:13am
v2
Comments
[no name] 18-Nov-12 8:05am    
you can have gridview inside tabcontainer
spriyanair 19-Nov-12 0:49am    
Hi my requirement is to add a tabpanel in each row of gridview

1 solution

I have tested again and find out that it will get the error above in design mode. However, the code works well when run it. In my opinion, it is a bug about VS

please find my code below

XML
<%@ 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></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" PageSize="6"
            Height="1173px" Width="705px" DataSourceID="AccessDataSource1">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                    SortExpression="ID" />
                <asp:BoundField DataField="Content" HeaderText="Content" SortExpression="Content" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1">
                            <asp:TabPanel ID="TabbPnl1" runat="server">
                                <HeaderTemplate>
                                    View User Trace
                                </HeaderTemplate>
                                <ContentTemplate>
                                    <asp:Panel ID="pnlMain" runat="server">
                                        <asp:TextBox ID="txt" runat="server" Text="panel1"></asp:TextBox></asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="TabPanel1" runat="server">
                                <HeaderTemplate>
                                    View User Trace2
                                </HeaderTemplate>
                                <ContentTemplate>
                                    <asp:Panel ID="Panel1" runat="server">
                                        <asp:TextBox ID="TextBox1" runat="server" Text="panel2"></asp:TextBox>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:TabPanel>
                        </asp:TabContainer>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Database1.accdb"
            SelectCommand="SELECT * FROM [Table1]"></asp:AccessDataSource>
    </div>
    </form>
</body>
</html>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900