4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 08 Apr 2013, 07:00 AM
Hi,
Try the following code.
C#:
Thanks,
Shinu
Try the following code.
C#:
protected
void
RadTreeList1_ItemDataBound(
object
sender, Telerik.Web.UI.TreeListItemDataBoundEventArgs e)
{
if
(e.Item.ItemType == TreeListItemType.AlternatingItem || e.Item.ItemType == TreeListItemType.Item)
{
TreeListDataItem item = e.Item
as
TreeListDataItem;
if
(item[
"username"
].Text ==
"name"
)
{
(item[
"EditCommandColumn"
].FindControl(
"InsertButton_EditCommandColumn"
)
as
LinkButton).Visible =
false
;
}
}
}
Thanks,
Shinu
0
wg
Top achievements
Rank 1
answered on 08 Apr 2013, 05:22 PM
Hi Shinu,
Many thanks for your reply, and I made little change.
Many thanks for your reply, and I made little change.
if (e.Item.ItemType == TreeListItemType.AlternatingItem || e.Item.ItemType == TreeListItemType.Item)
{
TreeListDataItem item = e.Item as TreeListDataItem;
var linkButton = item["EditCommandColumn"].FindControl("InsertButton_EditCommandColumn");
linkButton.Visible = false;
//(item["EditCommandColumn"].FindControl("InsertButton_EditCommandColumn") as LinkButton).Visible = false;
}
But it looks like it only applied to dataitem, not the left-top corner(header row) button.
Please take a look at the attachment.
Thank you very much.
Bill
0
Accepted
Shinu
Top achievements
Rank 2
answered on 09 Apr 2013, 04:44 AM
Hi,
Try overriding the default CSS as shown below.
CSS:
Thanks,
Shinu
Try overriding the default CSS as shown below.
CSS:
.RadTreeList .rtlAdd
{
display
:
none
!important
;
}
Thanks,
Shinu
0
wg
Top achievements
Rank 1
answered on 13 Apr 2013, 03:53 AM
Hi Shinu,
Thank you very much again. This is the solution I will use, you really helped me a lot.
Looks like Telerik doesn't like TreeList more than Grid. : )
Bill
Thank you very much again. This is the solution I will use, you really helped me a lot.
Looks like Telerik doesn't like TreeList more than Grid. : )
Bill