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

Cell template Problem

3 Answers 133 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Avi Avni
Top achievements
Rank 1
Avi Avni asked on 03 Aug 2010, 01:37 PM

Hello

I using cell template in the gird and it seems to have problem the control in the template have some margin and if I touching this margin I loosing the control in the cell

 I attached picture to see this behavior how I resolve this problem?

Best regards

Ehud

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 03 Aug 2010, 02:06 PM
Hello Ehud Pinchas,

It would be really helpful if you could paste the XAML code of the CellTemplate.


Sincerely yours,
Milan
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
Avi Avni
Top achievements
Rank 1
answered on 03 Aug 2010, 02:56 PM

Hello
the Xaml won't help 
I need to put in cell template of the grid my control.

If I'm Touching the white border around the control the control is disappear.

I can't use Data Member Binding In the data column

This the Xaml I will handles the binding  

<my:GridViewDataColumn  Header="StartWork" >

       <my:GridViewDataColumn.CellTemplate>

              <DataTemplate>

                     <my:RadTimePicker  Background="Red" />

              </DataTemplate>

       </my:GridViewDataColumn.CellTemplate>

</my:GridViewDataColumn>

 

How can I resolve this problem?

0
Nedyalko Nikolov
Telerik team
answered on 03 Aug 2010, 03:21 PM
Hello Ehud Pinchas,

Generally when GridViewDataColumn.CellTemplate and CellEditTemplate properties are set RadGridView's editing and validation logic will be by-passed. So if you want to enable editing functionality you have to bind control to the underlying property manually. Be aware that DataContext of the cell is your business object. By the way this is a possible solution to the problem with IDataErrorInfo interface (ticket #334198).

About the exact issue when you click on a white border you actually put this GridViewCell into edit mode, in order to prevent this you can set GridViewDataColumn.IsReadOnly to true.

For more information take a look at this online example.

Sincerely yours,
Nedyalko Nikolov
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
Tags
GridView
Asked by
Avi Avni
Top achievements
Rank 1
Answers by
Milan
Telerik team
Avi Avni
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Share this question
or