RadPageView inside RadTabStrip

2 posts, 0 answers
  1. dev79
    dev79 avatar
    13 posts
    Member since:
    Oct 2007

    Posted 03 Aug 2011 Link to this post


    I'm trying to pass the value of tab (param BE) that is clicked to show up in a grid inside RadPageView2.  For example:
    Tab A and B
    when Tab A is clicked, i would like the grid to come up using SqlDataSource2 with the BE field = 'A'.

    Can someone help?


    <%@ Page Language="C#" MasterPageFile="Public.master" AutoEventWireup="true" CodeFile="Sample.aspx.cs" Inherits="_Default" Debug="true" %>




    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>





    asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">





    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">























    <form id="form1" runat="server">




    <div><asp:scriptmanager runat="server" id="ScriptManager1">









    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">








    <telerik:AjaxSetting AjaxControlID="RadGrid1">








    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />




    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />




    <telerik:AjaxUpdatedControl ControlID="lbl_message" />






















    <br />




    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" AutoPostBack="true" MultiPageID="RadMultiPage1"




    DataSourceID="SqlDataSource1" DataTextField="peo" >









    <telerik:RadMultiPage ID="RadMultiPage1" runat="server">




    <telerik:RadPageView ID="PageView1" runat="server">




    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server">













    <telerik:RadPageView ID="RadPageView2" runat="server">




    <telerik:RadGrid ID="RadGrid2" DataSourceID="SqlDataSource2" runat="server">
















    <asp:SqlDataSource ID="SqlDataSource1"




    ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" runat="server"




    SelectCommand="SELECT BE FROM Projects WHERE (FY = @FY) AND ([BA] = @BA) GROUP BY BE">








    <asp:QueryStringParameter Name="FY" QueryStringField="FY" Type="String" />




    <asp:QueryStringParameter Name="BA" QueryStringField="BA" Type="String" />












    <asp:SqlDataSource ID="SqlDataSource2"




    ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" runat="server"




    SelectCommand="SELECT * FROM [PROJECTS_INPUT] WHERE (([FY] = @FY) AND ([BA] = @BA) AND ([BE] = @BE)) ">








    <asp:SessionParameter Name="FY" SessionField="FY" Type="String" />




    <asp:SessionParameter Name="BA" SessionField="BA" Type="String" />




    <asp:SessionParameter Name="BE" SessionField="BE" Type="String" />








    <telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server" Height="800px" Width="1000px">




    <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>






























  2. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 05 Aug 2011 Link to this post

    Hi Dev79,

    In order to achieve the desired functionality you should subscribe on the server-side TabClick event and in the event handler function you could get the value of the selected tab and then bind the grid with the appropriate data.

    Best wishes,
    Dimitar Terziev
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top