RadTreeListView add Textbox

4 posts, 0 answers
  1. eup
    eup avatar
    2 posts
    Member since:
    Nov 2006

    Posted 01 Dec 2011 Link to this post

         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


  2. Vera
    Admin
    Vera avatar
    263 posts

    Posted 01 Dec 2011 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. eup
    eup avatar
    2 posts
    Member since:
    Nov 2006

    Posted 02 Dec 2011 Link to this post

        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


  5. Vera
    Admin
    Vera avatar
    263 posts

    Posted 02 Dec 2011 Link to this post

    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 >>
Back to Top