This is a migrated thread and some comments may be shown as answers.

easy but weird question.

1 Answer 49 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
mathieu cupryk
Top achievements
Rank 1
mathieu cupryk asked on 17 Dec 2009, 04:21 AM
I have a panel bar with a button outside the radajaxpanel. If I click the button it will goto another radpanelitem. and then come back to the save button behind code.

What I need to do is that if this button is clicked. Put a value in a session variable?

 

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

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">

 

 

<telerik:RadPanelBar ID="RadPanelBar2"

 

 

OnItemDataBound="RadPanelBar2_ItemDataBound" runat="server" Skin="WebBlue"

 

 

ExpandMode="FullExpandedItem" Height="550px" Style= "position: static; border:0px"

 

 

Width="100%" oninit="RadPanelBar2_Init"

 

 

onitemclick="RadPanelBar2_ItemClick" onload="RadPanelBar2_Load">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="GENERAL INFORMATION" Font-Bold="true"

 

 

Expanded="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Height="350px" Value="GeneralInformation" runat="server">

 

 

<ItemTemplate>

 

 

<uc2:ctrlAboutMe ID="ctrlAboutMe" runat="server" />

 

 

<uc5:ctrlVisitorInformation ID="ctrlVisitorInformation" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="PHYSICAL CHARACTERISTICS" Font-Bold="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="PhysicalAttributes" runat="server">

 

 

<ItemTemplate>

 

 

<uc3:ctrlPhysicalAttributes ID="ctrlPhysicalAttributes" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="LIFESYLE AND HABBITS" Font-Bold="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="LifeStyle" runat="server">

 

 

<ItemTemplate>

 

 

<uc4:ctrlLifeStyle ID="ctrlLifeStyle" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="RELATIONSHIPS AND CHILDREN" Font-Bold="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="RelationshipChildren" runat="server">

 

 

<ItemTemplate>

 

 

<uc6:ctrlRelationshipChildren ID="ctrlRelationshipChildren" runat="server" />

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelBar>

 

 

</telerik:RadAjaxPanel>

 

 

<br />

 

 

<div align="center">

 

 

<asp:Label ID="lblProfileMessage" runat="server" Text=""></asp:Label>

 

 

<br />

 

 

<asp:ImageButton ID="SaveButton" OnClick="SaveButton_Click" runat="server" Visible="true"

 

 

ImageUrl="~/Images/Buttons/updatesilver.gif" />

 

 

<br />

 

 

<br />

 

 

</div>

 

 

</telerik:RadPageView>

 


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Dec 2009, 01:02 PM
Hello,

I am not quite sure about the scenario that you are trying. I guess you want to set the panelbaritem Expanded and save the corresponding value in session. If so you are try the following code.

CS:
 
    protected void SaveButton_Click(object sender, EventArgs e) 
    { 
        panelmenu1.FindItemByText("GENERAL INFORMATION").Expanded = true// Set the panelbar as expanded 
        string str = "value"
        Session["value"] = str; // Set the value 
    } 

Could you explain the requirement a bit more, if this does not help?

-Shinu.
Tags
PanelBar
Asked by
mathieu cupryk
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or