Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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
<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 18-Nov-12 1:35am
Edited 18-Nov-12 11:13am
Nelek51.4K
v2
Comments
Krunal R at 18-Nov-12 8:05am
   
you can have gridview inside tabcontainer
spriyanair at 19-Nov-12 0:49am
   
Hi my requirement is to add a tabpanel in each row of gridview

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
 
<%@ 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>
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 6,649
1 Sergey Alexandrovich Kryukov 6,280
2 CPallini 5,230
3 George Jonsson 3,574
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100