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

Validation in DataTemplate

1 Answer 173 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mehri
Top achievements
Rank 1
Mehri asked on 04 Aug 2011, 10:05 AM

Hi All

I had implemented INotifyDataError for my project it works fine for all column except the one in DataTemplate.(Error add to collection but it doesn't show in GridView)

 <telerik:RadGridView x:Name="grvData"
                             ItemsSource="{Binding AllData, Mode=TwoWay}" 
                             SelectedItem="{Binding SelectedData, Mode=TwoWay}"
                             IsFilteringAllowed="False"
                             ShowGroupPanel="False"
                             AutoGenerateColumns="False"
                             ShowInsertRow="True"
                             CanUserDeleteRows="False" 
                             IsSynchronizedWithCurrentItem="True"
                             ActionOnLostFocus="None" BeginningEdit="grvData_BeginningEdit"
                             Helper:EventFocusAttachment.ElementToFocus="{Binding ElementName=grvDataMaster}"                            
                             Grid.Column="1">
                <telerik:RadGridView.Columns>
                    <telerikGrid:GridViewColumn Header="کل تسعير ارز"  Width="150">
                        <telerik:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock>
                                 <TextBlock.Text>
                                        <MultiBinding Converter="{StaticResource NameConverter}" ConverterParameter="FormatNameValue">
                                          <Binding Path="ExchangeKolCode"/>
                                          <Binding Path="ExchangeKolName"/>
                                        </MultiBinding>
                                </TextBlock.Text>
                                </TextBlock>
                            </DataTemplate>
                        </telerik:GridViewColumn.CellTemplate>
                        <telerik:GridViewColumn.CellEditTemplate>
                            <DataTemplate>
                                <Controls:LookUp LookUpItemsSource="{Binding DataContext.KolLookUpItems, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"       
                                             LookUpId="{Binding ExchangeKol,Mode=TwoWay}"
                                             LookUpName="{Binding ExchangeKolName,Mode=TwoWay}"
                                             LookUpCode="{Binding ExchangeKolCode,Mode=TwoWay}" />

                            </DataTemplate>
                        </telerik:GridViewColumn.CellEditTemplate>
                    </telerikGrid:GridViewColumn> 
            </telerik:RadGridView>

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 04 Aug 2011, 10:13 AM
Hi Mehri,

 

Why not use directly a ComboBox control? As an alternative you may use the built-in GridViewComboBoxColumn for that purpose. 

All the best,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
GridView
Asked by
Mehri
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or