This is a migrated thread and some comments may be shown as answers.

Custom TreeListSelectColumn

1 Answer 91 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
ahmet
Top achievements
Rank 1
ahmet asked on 24 Sep 2014, 02:13 PM
Hi,
How can I as follows

foreach (TreeListDataItem item in treeList.Items)
{
   if(Convert.ToInt32(item.GetDataKeyValue("ID"))>=20000)
   item.Select.Enabled = false;                    
}

I want to use as attach file

1 Answer, 1 is accepted

Sort by
0
ahmet
Top achievements
Rank 1
answered on 25 Sep 2014, 03:06 PM
the problem was solved, i use like that:
aspx:
<telerik:TreeListTemplateColumn UniqueName="select">
                                                <HeaderTemplate>
                                                    &nbsp;
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="ss" runat="server" CommandName="Select" Width="24px" OnCheckedChanged="SelectButton_CheckedChanged" AutoPostBack="true"></asp:CheckBox>
                                                </ItemTemplate>
                                            </telerik:TreeListTemplateColumn>

C#:
if (e.Item is TreeListDataItem)
            {
                TreeListDataItem Item = (TreeListDataItem)e.Item;
                if(Convert.ToInt32(Item.GetDataKeyValue("ID"))>=20000)
                (Item["select"].FindControl("ss") as CheckBox).Visible = false;
            }
Tags
TreeList
Asked by
ahmet
Top achievements
Rank 1
Answers by
ahmet
Top achievements
Rank 1
Share this question
or