Welcome Guest Search | Active Topics | Sign In | Register

Tabstrip Itemclick even is not firing Options
Jai
Posted: Friday, July 27, 2007 6:29:59 AM
Rank: Newbie
Groups: Member

Joined: 7/27/2007
Posts: 3
I had set the RaisesServerEvent = true for TabStrip and Items as below

<eo:TabStrip ID="TabStrip1" MultiPageID="MultiPage1" runat="server" ControlSkinID="Simple_Gray" RaisesServerEvent="True">
<TopGroup>
<Items>
<eo:TabItem Text-Html="Tab 1" RaisesServerEvent=true>
</eo:TabItem>
<eo:TabItem Text-Html="Tab 2" RaisesServerEvent=true>
</eo:TabItem>
</Items>
</TopGroup>
</eo:TabStrip>

Here is the Item_Click handler in C#.Net

private void TabStrip1_ItemCLick(object sender, EO.Web.NavigationItemEventArgs e)
{
if (TabStrip1.SelectedIndex == 1)
{
///some code
}
}

When I put the breakpoint the event is not firing, Please let me know if I need to set anything
else for this event to fire.
eo_support
Posted: Friday, July 27, 2007 6:47:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

I tried your code and it works fine here. I can think of two possible situations why it is not firing on your machine:

1. You have validators in your page. When you have validators, those validators will be evaluated, and if one of them fail (for example, a RequiredFieldValidator), the page will not go back to the server;

2. While you have TabStrip1_ItemClick, the function may have not been hooked up as an event handler. To verify this, set a break point inside your Page_Load, not TabStrip1_ItemClick, then click a tab item, if you see Page_Load is hit, then RaisesServerEvent is working, the reason is because TabStrip1_Itemclick is not hooked up. The easiest way to get it hooked up is to delete the TabStrip and put it in again, then let Visual Studio or whatever designer tool to generates the event handler for you;

Also, you do not need to set RaisesServerEvent on each item individually. All you need to do is to set it on the TabStrip.

Thanks
Jai
Posted: Sunday, July 29, 2007 5:26:30 AM
Rank: Newbie
Groups: Member

Joined: 7/27/2007
Posts: 3
Hi,

Thanks for your help, but I still not able to get this to work.

I did the same as point#2, where in I had removed the Tab strip and added back.
-- Visual Studio didn't add ItemClick event, do I need to manually add ?
-- once I deleted and added back, now on the page load the TabStrip1.SelectedIndex is -1

Thanks
Jai
Jai
Posted: Sunday, July 29, 2007 5:45:42 AM
Rank: Newbie
Groups: Member

Joined: 7/27/2007
Posts: 3
Hi,

Please let me know how to hook the ItemClick event and get it to fire on clicking the tabs.
When I deleted and added the Tab strip back, visual Studio didn't add this event, so manually added this event.

private void TabStrip1_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
{
if (TabStrip1.SelectedIndex == 3)
getDetails();
}
eo_support
Posted: Sunday, July 29, 2007 7:19:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi Jai,

You need go to Property Window, then click the "Event" tab, you will see "ItemClick" event listed there. Click the drop down and you will be able to pick your handler.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.