Hello,
I am trying to add a RadPanelBar to my web project (ASP .NET AJAX).
I want to do this programmatically (VB or C#).
Inside each RadPanel item I want to place a RadGrid.
I have two problems:
1) I want to display three items of RadPanel items. I want the first item to show as expanded and the others as collapsed.
2) I have a problem handling the event of clicking on an item and then expanding or collapsing the appropriate item.
vb code:
aspx:
I am trying to add a RadPanelBar to my web project (ASP .NET AJAX).
I want to do this programmatically (VB or C#).
Inside each RadPanel item I want to place a RadGrid.
I have two problems:
1) I want to display three items of RadPanel items. I want the first item to show as expanded and the others as collapsed.
2) I have a problem handling the event of clicking on an item and then expanding or collapsing the appropriate item.
vb code:
dim x as integer = 0
Private
Sub
Page_Load(sender
As
Object
, e
As
EventArgs)
Handles
Me
.Load
panel_SideMenu.ExpandMode = PanelBarExpandMode.SingleExpandedItem
End
Sub
Private
Sub
setPanel(Of T)(
ByVal
list
As
List(Of T),
ByRef
ArrayNameFilds
As
Array, nameTitle
As
String
)
If
Not
IsPostBack
Then
Dim
radGridTmp
As
New
RadGrid
radGridTmp.DataSource = list
setColumnsOnGrid(radGridTmp, ArrayNameFilds)
radGridTmp.ClientSettings.Selecting.AllowRowSelect =
True
radGridTmp.ClientSettings.EnablePostBackOnRowClick =
False
radGridTmp.ClientSettings.Scrolling.AllowScroll =
True
Dim
radItemTmp
As
New
RadPanelItem()
radItemTmp.Text = nameTitle
radItemTmp.Controls.Add(radGridTmp)
Dim
radpanel
As
New
RadPanelItem
If
x = 0
Then
radpanel.Expanded =
True
End
If
radpanel.Items.Add(radItemTmp)
panel_SideMenu.Items.Add(radpanel)
x += 1
End
If
End
Sub
aspx:
<
telerik:RadPanelBar
ID
=
"panel_SideMenu"
Runat
=
"server"
>
</
telerik:RadPanelBar
>