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

RadTreeListView add Textbox

3 Answers 70 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
eup
Top achievements
Rank 1
eup asked on 01 Dec 2011, 03:25 PM
     Hi,

I hava a problem about RadTreeListView columns. I can show some columns to users in like Hierarchical Data.
everthings is ok. and then i add a coloumn and want to create a textbox put it in last column

  column1      column2     column3
some data   some data    TextBox

---------------------------

  <telerik:RadTreeListView  IsDragDropEnabled="True" IsDragTooltipEnabled="False" x:Name="treeListView" IsFilteringAllowed="False"  
                                  ItemsSource="{Binding TheTree}"  AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,120,5,32"
                                  CanUserFreezeColumns="False" CanUserReorderColumns="False" MinHeight="300" MaxHeight="500" RowIndicatorVisibility="Collapsed" >
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition  ItemsSource="{Binding ChildNodes}" />
            </telerik:RadTreeListView.ChildTableDefinitions>
            <telerik:RadTreeListView.Columns>
 
                <telerik:GridViewDataColumn  DataMemberBinding="{Binding Entity.MalKod}" Header="Mal Kodu"  IsReadOnly="True"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Entity.MalAdi}" Header="Mal Adı"  IsReadOnly="True"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Entity.OlcuAd}" Header="Ölçü"  IsReadOnly="True"/>
                
               // i want to add textbox other column.
               //<TextBox Name="textBox1" VerticalAlignment="Top" Width="120" />
               //GIVES ERROR               

            </telerik:RadTreeListView.Columns>
            
               
        </telerik:RadTreeListView>


   How can i do that. Ofcourse i can use gridview but my data is Hierarchical so i have to show like tree


3 Answers, 1 is accepted

Sort by
0
Vera
Telerik team
answered on 01 Dec 2011, 05:25 PM
Hi Eup,

Please, take a look at our online documentation for a reference.

Best wishes,
Vera
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
eup
Top achievements
Rank 1
answered on 02 Dec 2011, 08:42 AM
    Hi Vera,

thanx for quick replay. I already look the online documents that you offered to me. But this document talking about CellTemplates for RadGrdiView not RadTreeListView.

the document saying that if you want to create CellTemplate :

 <telerik:GridViewDataColumn.CellEditTemplate>
    <DataTemplate>
     <telerik:RadDateTimePicker CurrentDateTimeText="{Binding StartingDate}" IsTooltipEnabled="False"/>
    </DataTemplate>
   </telerik:GridViewDataColumn.CellEditTemplate>


But this codes gives an error when i put it in RadTreeListView control. I didnt find any example code about this subject.

thank you


0
Vera
Telerik team
answered on 02 Dec 2011, 05:24 PM
Hello Eup,

Actually, RadTreeListView inherits the RadGridView control, so the approach will work here as well. I have attached a sample project based on your requirements. Could you please take a look at it?
I would recommend you to run through our online documentation and demos.

Let me know if further assistance is needed.

All the best,
Vera
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
TreeListView
Asked by
eup
Top achievements
Rank 1
Answers by
Vera
Telerik team
eup
Top achievements
Rank 1
Share this question
or