
Sagar Baheti
Top achievements
Rank 1
Sagar Baheti
asked on 11 Aug 2008, 12:04 PM
Hi,
Actually i have one requirement in which i want to add RadTree as Column in RadGrid. So Can you tell me is it possible to add RadTree as column in RadGrid?
If yes please suggest me some example so that i can start for it
Please help me.....
Thanks and regards,
Sagar
Actually i have one requirement in which i want to add RadTree as Column in RadGrid. So Can you tell me is it possible to add RadTree as column in RadGrid?
If yes please suggest me some example so that i can start for it
Please help me.....
Thanks and regards,
Sagar
4 Answers, 1 is accepted
0
Hi Sagar,
You can place any control in GridTemplateColumn ItemTemplate including RadTreeView.
Best wishes,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can place any control in GridTemplateColumn ItemTemplate including RadTreeView.
Best wishes,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Princy
Top achievements
Rank 2
answered on 11 Aug 2008, 12:21 PM
Hi Sagar,
You can also have a look at the following demo link to get more details about the column types in RadGrid.
Column types
Thanks
Princy.
You can also have a look at the following demo link to get more details about the column types in RadGrid.
Column types
Thanks
Princy.
0

Sagar Baheti
Top achievements
Rank 1
answered on 14 Aug 2008, 07:09 AM
Hi Princy,
Actually i have one column in Grid as RadTree , now how can i bind data to tree which in the column in the RadGrid. I tried to find that conrol in NeedDataScource method but i couldn't. My column structure is as given in the following code
<Columns>
<telerik:GridTemplateColumn HeaderText="Bundle Name" HeaderButtonType="TextButton" UniqueName="bundle_id" >
<ItemTemplate>
<div id="div1">
<telerik:RadTreeView ID="radOrgTreeView" runat="server" OnClientNodeClicking="nodeClicking" >
<CollapseAnimation Duration="100" Type="OutQuint" />
<ExpandAnimation Duration="100" />
</telerik:RadTreeView>
</div>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn SortExpression="ShortName" HeaderText="Short Name" HeaderButtonType="TextButton" UniqueName="CategoryId" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="Edit" HeaderText="Edit" HeaderButtonType="TextButton" UniqueName="Description"></telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="Delete" HeaderText="Delete" HeaderButtonType="TextButton" UniqueName="Description"></telerik:GridBoundColumn>
</Columns>
please help me for that...
Thanks and regard,
Sagar
Actually i have one column in Grid as RadTree , now how can i bind data to tree which in the column in the RadGrid. I tried to find that conrol in NeedDataScource method but i couldn't. My column structure is as given in the following code
<Columns>
<telerik:GridTemplateColumn HeaderText="Bundle Name" HeaderButtonType="TextButton" UniqueName="bundle_id" >
<ItemTemplate>
<div id="div1">
<telerik:RadTreeView ID="radOrgTreeView" runat="server" OnClientNodeClicking="nodeClicking" >
<CollapseAnimation Duration="100" Type="OutQuint" />
<ExpandAnimation Duration="100" />
</telerik:RadTreeView>
</div>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn SortExpression="ShortName" HeaderText="Short Name" HeaderButtonType="TextButton" UniqueName="CategoryId" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="Edit" HeaderText="Edit" HeaderButtonType="TextButton" UniqueName="Description"></telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="Delete" HeaderText="Delete" HeaderButtonType="TextButton" UniqueName="Description"></telerik:GridBoundColumn>
</Columns>
please help me for that...
Thanks and regard,
Sagar
0

Princy
Top achievements
Rank 2
answered on 14 Aug 2008, 08:14 AM
Hello Sagar,
You can try accessing the TreeView in the TemplateColumn, in the ItemDataBound event and then try binding it to the DataSource as shown below.
cs:
Thanks
Princy.
You can try accessing the TreeView in the TemplateColumn, in the ItemDataBound event and then try binding it to the DataSource as shown below.
cs:
protected void RadGrid4_ItemDataBound(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem) |
{ |
GridDataItem data = (GridDataItem)e.Item; |
RadTreeView treeview = (RadTreeView)data["bundle_id"].FindControl("radOrgTreeView"); |
treeview.DataTextField = "ID"; |
treeview.DataSourceID = "SqlDataSource2"; |
} |
} |
Thanks
Princy.