Welcome Guest Search | Active Topics | Sign In | Register

Callback EO.Web Menu Options
Kjell Ek
Posted: Sunday, November 8, 2009 8:44:26 AM
Rank: Advanced Member
Groups: Member

Joined: 4/14/2009
Posts: 33
How do I use EO.Web Callback Controls with EO.Web Menu?
I'm using EO.Web Menu (Data Binding).
When I click on the menu, I just want to update the label with information from the database, without updating the menu or the entire page, only label area dynamically.
Is it possible to do with CallbackPanel? I've tried, but not received it work
eo_support
Posted: Sunday, November 8, 2009 9:04:52 AM
Rank: Administration
Groups: Administration

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

You will need to:

1. Set the menu's RaisesServerEvent to true;
2. Edit the CallbackPanel's Triggers property to include the menu;
3. Place the Label inside the CallbackPanel;

Thanks!
Kjell Ek
Posted: Sunday, November 8, 2009 9:25:55 AM
Rank: Advanced Member
Groups: Member

Joined: 4/14/2009
Posts: 33
Does this look right out? When I click on the menu, the menu will be updated / loaded the page on ...

Code: Visual Basic.NET
<eo:CallbackPanel id="cpMenu" Triggers="{ControlID:Menu1;Parameter:}" runat="server">
                            <eo:Menu ID="Menu1" RaisesServerEvent="True" DataFields="sidnamn" Width="162px" runat="server">
                                <LookItems>
                                    <eo:MenuItem ItemID="_TopGroup">
                                        <SubMenu ItemSpacing="2">
                                        </SubMenu>
                                    </eo:MenuItem>
                                    <eo:MenuItem ItemID="_TopLevelItem" HoverStyle-CssClass="TopMenuItemHover" NormalStyle-CssClass="TopMenuItem"
                                        RightIcon-HoverUrl="~/picture/menuImages/arrow_hover.gif" RightIcon-Url="~/picture/menuImages/arrow.gif"
                                        SubMenuIcon="RightIcon" Height="16">
                                        <SubMenu Style-CssClass="MenuGroup">
                                        </SubMenu>
                                    </eo:MenuItem>
                                    <eo:MenuItem ItemID="_Default" HoverStyle-CssClass="MenuItemHover" NormalStyle-CssClass="MenuItem"
                                        RightIcon-HoverUrl="~/picture/menuImages/arrow_hover.gif" RightIcon-Url="~/picture/menuImages/arrow.gif"
                                        SubMenuIcon="RightIcon" Height="16">
                                        <SubMenu Style-CssClass="MenuGroup">
                                        </SubMenu>
                                    </eo:MenuItem>
                                </LookItems>
                                <TopGroup DataFields="sidnamn" Orientation="Vertical">
                                    <Bindings>
                                        <eo:DataBinding DataField="NavigateUrl" Property="NavigateUrl" />
                                        <eo:DataBinding DataField="target" Property="TargetWindow" />
                                        <eo:DataBinding DataField="NodeId" Property="Value" />
                                    </Bindings>
                                </TopGroup>
                            </eo:Menu>
							</eo:CallbackPanel>


<eo:CallbackPanel id="cpRubrik" runat="server"><asp:PlaceHolder ID="PlaceHolder1" runat="server" /></eo:CallbackPanel>

<eo:CallbackPanel id="cpMsg" runat="server"><asp:Label ID="lblMsg" runat="server" /></eo:CallbackPanel>
eo_support
Posted: Sunday, November 8, 2009 9:33:31 AM
Rank: Administration
Groups: Administration

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

Not at all. There are several problems:

1. You will never use NavigateUrl and RaisesServerEvent at the same time. RaisesServerEvent (and CallbackPanel) goes back to the same page. NavigateUrl goes to a different page. These two contradict each other by nature;

2. Your original post mentioned that you wanted to update a Label, not the Menu. If that's the case, then you should not place the Menu inside CallbackPanel. CallbackPanel should contain whatever you want to be updated;

3. Multiple CallbackPanels do not update at the same time automatically. If you wish them to update together, you will need to set their GroupName to the same value;

Thanks
Kjell Ek
Posted: Sunday, November 8, 2009 12:26:40 PM
Rank: Advanced Member
Groups: Member

Joined: 4/14/2009
Posts: 33
If I understand right, I can not use the NavigateUrl and call back panel together?

How do I use Data Bind EO.Web Menu without NavigateUrl, are the there examples of it?

And if I not use the NavigateUrl, I can not use <eo:DataBinding DataField="target" Property="TargetWindow" />, or? Different TargetWindow on various items....
eo_support
Posted: Sunday, November 8, 2009 1:08:16 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Kjell Ek wrote:
If I understand right, I can not use the NavigateUrl and call back panel together?

That is correct. You can not use NavigateUrl and server event at the same time. In the real world you should not have such scenario at all. Asking using NavigateUrl and CallbackPanel at the same time is like asking to go left and right at the same time.

Kjell Ek wrote:
How do I use Data Bind EO.Web Menu without NavigateUrl, are the there examples of it?

It's the same for you to bind to any other property.

Kjell Ek wrote:
And if I not use the NavigateUrl, I can not use <eo:DataBinding DataField="target" Property="TargetWindow" />, or? Different TargetWindow on various items....

It's more likely you are looking for some JavaScript coding because you seem to have some serious confusion about how server event works. Server event is a very generic ASP.NET topic so it might be better if you can find someone else to explain this to you. Once you are clear about what you want to do, we can help you further on the specific programming interface related to our menu.

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.