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

[Solved] Custom Edit View

1 Answer 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tang Yuanyuan
Top achievements
Rank 1
Tang Yuanyuan asked on 03 Dec 2010, 08:37 AM
I wanna each grid appear as textbox as the control loaded. So I custom the CellTemplate as below. 
<telerik:GridViewColumn.CellTemplate>
    <DataTemplate>
        <TextBox Text="{Binding Temperature, Mode=TwoWay}" TextAlignment="Center"
                 telerik:StyleManager.Theme="Windows7"/>
    </DataTemplate>
</telerik:GridViewColumn.CellTemplate>

That works, but the UI(01.png) looks uglier than the default one(02.png).
How to fix this problem? Or Is there a better method to achieve that?
I'm not vary familiar with style. Is there any gridview textbox style to apply on the textbox? How to do it?

thx


1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 06 Dec 2010, 01:47 PM
Hello Tang,

If you have already specified a Theme for your RadGridView, you do not need to specify it again in a TextBox as it was shown in your example, in this way you will get the default TextBox style defined in our Windows7 Theme. Considering you second attached picture you are showing a GridViewCell in edit mode, actually it uses a TextBox when it is in edit mode, but the logic is a little bit different there, you can read more about this here.

Please refer to the attached project.


Best wishes,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
Tang Yuanyuan
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or