Hi,
I am using a RadPanelBar and within the RadPanelBar I have a radgrid, that is being populated by data OnItemClick event.
My problem is that all expansion behavior is lost once a panel bar is open it cannot be closed again, and ieve the SingleExpanededItem expandMode is lost.
Any Help?
Thanks.
HTML SNIPPET
C# RadPanelBar Bind
C# RadPanelBar OnItemClick
I am using a RadPanelBar and within the RadPanelBar I have a radgrid, that is being populated by data OnItemClick event.
My problem is that all expansion behavior is lost once a panel bar is open it cannot be closed again, and ieve the SingleExpanededItem expandMode is lost.
Any Help?
Thanks.
HTML SNIPPET
<
telerik:RadPanelBar
ID
=
"rpbStudentList"
runat
=
"server"
Width
=
"100%"
OnItemClick
=
"rpbStudentList_ItemClick"
ExpandMode
=
"SingleExpandedItem"
>
<
ItemTemplate
>
<
telerik:RadGrid
ID
=
"rgrdScheduleList"
runat
=
"server"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
Visible
=
"False"
OnItemDataBound
=
"rgrdScheduleList_ItemDataBound"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"SAT_PK"
HeaderText
=
"SATPK"
UniqueName
=
"SAT_PK"
Visible
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SAT_CSTU_FK"
HeaderText
=
"SATCSTUFK"
UniqueName
=
"SAT_CSTU_FK"
Visible
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SAT_SBO_FK"
HeaderText
=
"SATSBOFK"
UniqueName
=
"SAT_SBO_FK"
Visible
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CSC_PK"
HeaderText
=
"CSCPK"
UniqueName
=
"CSC_PK"
Visible
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CSC_DATE"
HeaderText
=
"Lesson Date"
UniqueName
=
"CSC_DATE"
Visible
=
"True"
DataFormatString
=
"{0:dd/MMM/yyyy}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CSC_TIME_FROM"
HeaderText
=
"Time From"
UniqueName
=
"CSC_TIME_FROM"
Visible
=
"True"
DataFormatString
=
"{0:hh:mm}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CSC_TIME_TO"
HeaderText
=
"Time To"
UniqueName
=
"CSC_TIME_TO"
Visible
=
"True"
DataFormatString
=
"{0:hh:mm}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"SAT_ABSENT"
HeaderText
=
"Attendance"
Visible
=
"true"
>
<
ItemTemplate
>
<
table
>
<
tr
>
<
td
>
<
asp:RadioButton
ID
=
"rbtnPresent"
runat
=
"server"
GroupName
=
"AttendanceTemplate"
Text
=
"Present"
Checked
=
"true"
/>
</
td
>
<
td
>
<
asp:RadioButton
ID
=
"rbtnAbsent"
runat
=
"server"
GroupName
=
"AttendanceTemplate"
Text
=
"Absent"
/>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"SAT_REASON"
HeaderText
=
"Absence Reason"
Visible
=
"true"
DataField
=
"ABSENCE_REASON_LIST"
>
<
ItemTemplate
>
<
telerik:RadComboBox
ID
=
"rddlReason"
runat
=
"server"
DataValueField
=
"SAR_PK"
DataTextField
=
"SAR_REASON"
>
</
telerik:RadComboBox
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"SAT_COMMENTS"
HeaderText
=
"Comments"
Visible
=
"true"
DataField
=
"SAT_COMMENTS"
>
<
ItemTemplate
>
<
telerik:RadTextBox
ID
=
"rtxtComments"
runat
=
"server"
Text='<%# Eval("SAT_COMMENTS") %>'>
</
telerik:RadTextBox
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:Button
ID
=
"btnSave"
runat
=
"server"
Text
=
"Button"
Visible
=
"false"
OnClick
=
"btnSave_Click"
/>
</
ItemTemplate
>
</
telerik:RadPanelBar
>
C# RadPanelBar Bind
rpbStudentList.DataSource = list;
rpbStudentList.DataTextField = "STD_STUDENT_FULLNAME";
rpbStudentList.DataValueField= "STD_PK";
rpbStudentList.DataBind();
C# RadPanelBar OnItemClick
RadGrid rgrdScheduleList = (e.Item.FindControl("rgrdScheduleList") as RadGrid);
rgrdScheduleList.Visible = true;
rgrdScheduleList.DataSource = sessionStudentAttendance.STUDENT_ATTENDANCE_LIST;
rgrdScheduleList.DataBind();