Search
Sponsor
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Codes Author
Sun, 23-Nov-2014 Authors
All Time Authors
Satyapriyanayak
12160
Vishal@Neeraj
8800
Jayakumars
8120

Latest members | More ...


(Statistics delayed by 5 minutes)
 Codes

AJAX tab control

Santosh0683
Posted by Santosh0683 under ASP.NET AJAX on 8/3/2010 12:49:16 PM | Views : 5828 | Status : [Member]

< ajaxToolkit:TabPanel ID="tabFirst" runat="server" Width="111px" >

< HeaderTemplate>
First Tab Header name
< /HeaderTemplate>
< ContentTemplate>
< br />
< asp:GridView ID="gvEmpDetail" runat="server" DataKeyNames="EmpId" AllowPaging="True" PageSize="12"
AutoGenerateColumns="False" OnPageIndexChanging="gvEmpDetail_PageIndexChanging"
OnRowDataBound="gvEmpDetail_RowDataBound" TabIndex="2" Width="697px" OnRowCancelingEdit="gvEmpDetail_RowCancelingEdit"
OnRowEditing="gvEmpDetail_RowEditing" OnRowUpdating="gvEmpDetail_RowUpdating"
ShowFooter="True" OnRowCommand="gvEmpDetail_RowCommand" OnRowDeleting="gvEmpDetail_RowDeleting">
< Columns>
< asp:TemplateField HeaderText="Sr. No">
< ItemTemplate>
< asp:Label ID="lblSrNo" runat="server"> </asp:Label>
< /ItemTemplate>
< /asp:TemplateField>
< asp:TemplateField HeaderText="EmpId" Visible="False">
< ItemTemplate>
< asp:Label ID="lblEmpId" runat="server" Text=' <%# Bind("EmpId") %>'> </asp:Label>
< /ItemTemplate>
< FooterTemplate>
< asp:Label ID="lblFooterEmpId" runat="server"> </asp:Label>
< /FooterTemplate>
< /asp:TemplateField>
< asp:TemplateField HeaderText="Emp">
< ItemTemplate>
< asp:Label ID="lblEmp" runat="server" Text=' <%# Bind("Emp") %>'> </asp:Label>
< /ItemTemplate>
< EditItemTemplate>
< asp:TextBox ID="txtEmp" runat="server" Text=' <%# Bind("Emp") %> '> </asp:TextBox>
< /EditItemTemplate>
< FooterTemplate>
< asp:TextBox ID="txtNewEmp" runat="server" Visible="false"> </asp:TextBox>
< /FooterTemplate>
< /asp:TemplateField>
< /Columns>
< /asp:GridView>
< asp:Label ID="exceptionMessage" runat="server" ForeColor="Red" Width="498px"> </asp:Label>
< /ContentTemplate>
< /ajaxToolkit:TabPanel>

< ajaxToolkit:TabPanel ID="tabEmpInfo" runat="server" >
< HeaderTemplate>
Emp Information
< /HeaderTemplate>
< ContentTemplate>
< br />
< asp:GridView ID="gvEmpInfo" runat="server" AllowPaging="True" AutoGenerateColumns="False" PageSize="12"
DataKeyNames="EmpInfoId">
< Columns>
< asp:TemplateField HeaderText="Sr. No">
< ItemTemplate>
< asp:Label ID="lblSrNo" runat="server"> </asp:Label>
< /ItemTemplate>
< ItemStyle HorizontalAlign="Center" Width="50px" />
< /asp:TemplateField>
< /Columns>
< /asp:GridView>
< asp:Label ID="exceptionEmpInfo" runat="server" ForeColor="Red" Width="498px">
< /ContentTemplate>
< /ajaxToolkit:TabPanel>

.cs code

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
tabInstitue.Enabled = true;
tabDegree.Enabled = true;
tabBoardUniversity.Enabled = true;
TabCont1.ActiveTabIndex = 0;
GridViewEmpDetail();
GridViewEmpInfo();
}
}

protected void GridViewEmpDetail()
{
Ds = objEmpDetailBLL.GetEmpDetailData();
if (Ds.Tables[0].Rows.Count > 0)
{
gvEmpDetail.DataSource = Ds;
gvEmpDetail.DataBind();
}

}
protected void GridViewEmpInfo()
{
Ds = objEmpInfoBLL.GetEmpInfoData();
if (Ds.Tables[0].Rows.Count > 0)
{
gvEmpInfo.DataSource = Ds;
gvEmpInfo.DataBind();
}
}
}


Santosh Singh
http://aspdotnetcode.blogspot.in/
Found interesting? Add this to:



Comments or Responses


Login to post response