TabPanel adding DirectMethods for checking a Click Event in tab

  1. #1

    TabPanel adding DirectMethods for checking a Click Event in tab

    Hi,
    Is there any way to add EventListener / DirectMethods on server side which will check if tab of specific id was clicked?

    if this can be done pls give me some sample how to make it in code behind
  2. #2
    Hi,

    The TabPanel fires the <TabChange> event when a new Tab is clicked.

    http://docs.sencha.com/ext-js/3-4/#!...vent-tabchange

    An instance of the 'newTab' is passed, which you can then use to check the .id.

    Example

    <ext:TabPanel runat="server" Width="350" Height="215">
        <Items>
            <ext:Panel ID="Panel1" runat="server" Title="Tab 1" />
            <ext:Panel ID="Panel2" runat="server" Title="Tab 2" />
            <ext:Panel ID="Panel3" runat="server" Title="Tab 3" />
        </Items>
        <Listeners>
            <TabChange Handler="console.log(newTab.id);" />
        </Listeners>
    </ext:TabPanel>
    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    but how can i check which tab was clicked in c# code behind?

    or how to fire (if this can be done this way)
    public void OnTabClickMethod(object sender, DirectEventArgs e)
    {
         //do something here
    }

Similar Threads

  1. [CLOSED] Adding Click Event in code-behind
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 20, 2012, 5:02 PM
  2. [CLOSED] ext:Button: Adding listener to a click event
    By supera in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 05, 2012, 12:04 PM
  3. [CLOSED] Adding a listener to BeforeDestroy event on TabPanel
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 22, 2012, 12:49 PM
  4. Replies: 5
    Last Post: Jan 06, 2011, 9:58 PM
  5. [CLOSED] Adding Click Event In Code Behind
    By rcaunt in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 07, 2009, 9:12 AM

Tags for this Thread

Posting Permissions