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

How to set EditTemplateSelector?

2 Answers 45 Views
GridView
This is a migrated thread and some comments may be shown as answers.
VH
Top achievements
Rank 1
VH asked on 30 Mar 2010, 04:54 AM
Hi,

I would like to make a editTemplateSelector for GridViewDataColumn, and I have tried doing something as shown below:
<telerikGridView:GridViewDataColumn.CellEditTemplate> 
    <DataTemplate>     
         <localControls:GridViewNameEditTemplateSelector Content="{Binding}">  
              <localControls:GridViewNameEditTemplateSelector.EditTemplate> 
                   <DataTemplate> 
                       <TextBox Text="{Binding Name, Mode=TwoWay}"/>  
                   </DataTemplate> 
               </localControls:GridViewNameEditTemplateSelector.EditTemplate> 
               <localControls:GridViewNameEditTemplateSelector.NonEditableTemplate> 
                   <DataTemplate> 
                       <TextBlock Text="{Binding Name}" HorizontalAlignment="Center"/>  
                   </DataTemplate> 
               </localControls:GridViewNameEditTemplateSelector.NonEditableTemplate> 
         </localControls:GridViewNameEditTemplateSelector> 
    </DataTemplate> 
</telerikGridView:GridViewDataColumn.CellEditTemplate> 

The problem is when a certain cell is not editable, I can still see the text of TextBlock shifted. Is there any better approach to set the selector?

Cheers,

VH

2 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 30 Mar 2010, 12:33 PM
Hello VH,

In our next service pack (two weeks away) we will have CellTemplateSelector and CellEditTemplateSelector properties on the column that you can use. Actually these properties will be available in our next latest internal build if you want to experiment with them.

All the best,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
VH
Top achievements
Rank 1
answered on 30 Mar 2010, 10:31 PM
Ok, thanks, looking forward to see it. :)
Tags
GridView
Asked by
VH
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
VH
Top achievements
Rank 1
Share this question
or