3 Answers, 1 is accepted
0
Accepted
Shinu
Top achievements
Rank 2
answered on 08 Nov 2011, 04:44 AM
Hello Tina,
Try the following code.
aspx:
Thanks,
Shinu.
Try the following code.
aspx:
<
telerik:RadTreeList
ID
=
"RadTreeList1"
runat
=
"server"
DataSourceID
=
"SqlDataSource2"
ParentDataKeyNames
=
"ReportsTo"
DataKeyNames
=
"EmployeeID"
AutoGenerateColumns
=
"true"
>
<
DetailTemplate
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
DataSourceID
=
"SqlDataSource1"
AutoGenerateColumns
=
"true"
>
</
telerik:RadGrid
>
</
DetailTemplate
>
</
telerik:RadTreeList
>
Thanks,
Shinu.
0
Tina
Top achievements
Rank 1
answered on 09 Nov 2011, 02:33 AM
Thanks shinu.
I want to add a combobox in itemtempolate dynamically.Can you help on this?
I want to add a combobox in itemtempolate dynamically.Can you help on this?
0
Shinu
Top achievements
Rank 2
answered on 09 Nov 2011, 04:54 AM
Hello,
Try the following code snippet in ItemDataBound event.
C#:
-Shinu
Try the following code snippet in ItemDataBound event.
C#:
protected
void
RadTreeList1_ItemCreated(
object
sender, TreeListItemCreatedEventArgs e)
{
if
(e.Item
is
TreeListDataItem)
{
TreeListDataItem item = e.Item
as
TreeListDataItem;
TableCell cell = (TableCell)item[
"TemplateColumnUniqueName"
];
RadComboBox combo =
new
RadComboBox();
combo.DataValueField =
"LastName"
;
combo.DataTextField =
"LastName"
;
combo.DataSourceID =
"SqlDataSource1"
;
cell.Controls.Add(combo);
}
}
-Shinu